邓平艺 5 years ago
parent
commit
8cc4a885f0
  1. 5
      canteen/common/api.js
  2. 10
      canteen/pages/classification/warehouse.vue
  3. 11
      canteen/pages/delivery/apply.vue
  4. 131
      canteen/pages/delivery/detail.vue
  5. 39
      canteen/pages/delivery/order.vue
  6. 27
      canteen/pages/purchase/detail.vue
  7. 26
      canteen/pages/purchase/order.vue
  8. 2
      supplier/common/api.js
  9. 2
      supplier/pages/gonghuo/order.vue
  10. 2
      supplier/pages/order/index.vue

5
canteen/common/api.js

@ -3,7 +3,7 @@ export const DEV = "dev"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
// export const DEVURL = 'http://192.168.3.78'; // 测试服请求地址
export const DEVURL = 'http://fsc.lanzulive.com'; // 测试服请求地址
// export const DEVURL = 'http://192.168.3.96'; // 测试服请求地址
// export const DEVURL = 'http://192.168.43.78'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址
export const API_CANTEEN_LOGIN = '/api/canteen/login'; // 登录
@ -14,6 +14,9 @@ export const API_CANTEEN_PURCHASEORDERLIST = '/api/canteen/purchaseOrderList'; /
export const API_CANTEEN_WAREHOUSEOUT = '/api/canteen/warehouseOut'; // 出库申请
export const API_CANTEEN_WAREHOUSEOUTLIST = '/api/canteen/warehouseOutList'; // 出库申请列表
export const API_CANTEEN_PURCHASEDETAIL = '/api/canteen/purchaseDetail'; // 采购单详情
export const API_CANTEEN_OUTDETAIL = '/api/canteen/warehouseOutDetail'; // 出库单详情
export const API_CANTEEN_SUPPLIERLIST = '/api/canteen/supplierList'; // 供应商列表
export const API_CANTEEN_MATERIALLISTBYWAREHOUSE = '/api/canteen/materialListByWarehouse'; // 仓库物资列表
export const API_CANTEEN_PURCHASEUPDATE = '/api/canteen/purchaseUpdate'; // 改变采购单状态

10
canteen/pages/classification/warehouse.vue

@ -86,7 +86,7 @@
return item;
})
let list = res.data.material.map(item => {
if(this.checked_list[item.material_id]){
if(this.checked_list[item.order_id]){
item.checked = true;
}else{
item.checked = false;
@ -97,7 +97,7 @@
this.tab_list = tab_list;
}else{
let list = res.data.material.map(item => {
if(this.checked_list[item.material_id]){
if(this.checked_list[item.order_id]){
item.checked = true;
}else{
item.checked = false;
@ -122,16 +122,16 @@
if(this.is_search_ing){
this.tab_list.forEach(t_item => {
t_item.list.forEach(l_item => {
if(l_item.material_id == item.material_id){
if(l_item.material_id == item.order_id){
l_item.checked = item.checked;
}
})
})
}
if(item.checked){
this.checked_list[item.material_id] = item;
this.checked_list[item.order_id] = item;
}else{
delete this.checked_list[item.material_id];
delete this.checked_list[item.order_id];
}
uni.$emit('addWarehouseList', this.checked_list);
console.log("checked_list", this.checked_list)

11
canteen/pages/delivery/apply.vue

@ -77,6 +77,10 @@
let contents = [];
let warehouse_list = this.warehouse_list;
for(let i in warehouse_list){
warehouse_list[i].delivery_number = {edit: true, value: '1'}
warehouse_list[i].brand = i.brand
warehouse_list[i].quality_level = i.quality_level
contents.push(warehouse_list[i]);
}
this.contents = contents;
@ -94,16 +98,19 @@
return this.$msg('您未选择物资')
}
let list = this.contents.map(item => {
console.log(item)
return {
m_id: item.material_id,
m_spec_id: item.spec_id,
tax_price: '',
non_tax_price: '',
purchase_id: item.purchase_id,
out_number: ''
out_number: '' ,
state: '待确认'
}
});
this.contents = list;
console.log('==========',list)
// let state = ['', ''][_t]; //
this.$http(this.API.API_CANTEEN_WAREHOUSEOUT, {
data: list

131
canteen/pages/delivery/detail.vue

@ -26,9 +26,24 @@
</view>
<view style="height: 100rpx;"></view>
<!-- 操作按钮 -->
<view class="fixed-bottom">
<button class="btn btn2">立即申请</button>
</view>
<!-- <view class="fixed-bottom" v-if="type != '备货中'">
<view v-if="type == '待发单'" class="lf-row-flex-end">
<button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=1')">编辑</button>
<button class="btn btn2">立即发单</button>
</view>
<view v-else-if="type == '待接单'" class="lf-row-flex-end">
<button class="btn btn2" style="background-color: #FF0000;" @click="orderStateChange('已撤销')">撤销订单</button>
</view>
<view v-else-if="type == '已发货'" class="lf-row-flex-end">
<button class="btn btn1">退单</button>
<button class="btn btn1 lf-m-l-20" @click="is_show_voucher = true">上传凭证</button>
<button class="btn btn2" @click="$url('/pages/purchase/receipt?o_sn='+ order.o_sn)">确认收货</button>
</view>
<view v-else-if="type == '已收货' || type == '已入库'" class="lf-row-between">
<button class="btn btn1" @click="$url('/pages/purchase/launch?o_sn='+ order.o_sn+'&enter_type=2')">复用采购单</button>
<view class="lf-font-32" style="color: #11D189;">已完成</view>
</view>
</view> -->
</view>
</template>
@ -40,66 +55,66 @@
components: { lfYsteps, wybTable },
data(){
return {
stepList: [
{
time: '2021-07-23 13:23:52', // --
info: '订单创建', // --
isFinished: false, // index --
isActive: true, // Active 使 index --
isShowSlot: false // Slot --
}
],
stepList: [],
headers: [{
key: 'name',
label: '姓名'
},{
key: 'age',
label: '年龄'
},{
key: 'sex',
label: '性别'
},{
key: 'height',
label: '身高'
},{
key: 'info',
label: '描述'
},{
key: 'operation',
label: '操作'
}],
contents: [{
name: '张三',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是',
operation: {button: true, key: 'delete', value: '删除'}
}, {
name: '李四',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
}, {
name: '赵五',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
},{
name: '王六',
age: '18',
sex: '男',
height: '192cm',
info: '无敌叫是'
}]
label: '物资名称',
key: 'material_name'
},{
label: '规格',
key: 'spec_name'
},{
key: 'brand',
label: '品牌'
},{
key: 'quality_level',
label: '品级'
},{
label: '编号',
key: 'm_sn'
},{
label: '供应商',
key: 'supplier_name'
},{
label: '批次',
key: 'purchase_id'
},{
key: 'delivery_number',
label: '出库数量'
}],
contents: [],
o_sn: '',
order: {},
type: 4,
}
},
onLoad(){
onLoad(options){
this.o_sn = options.id || '';
this.getData();
},
methods: {
getData(){
this.$http(this.API.API_CANTEEN_OUTDETAIL, {
o_sn: this.o_sn
// o_sn: '802316269455228606'
}).then(res => {
console.log("xxx",res)
this.order = res.data
let list = res.data || [];
let contents = list.map(item => {
return {
material_name: item.material.m_name,
spec: item.spec.name,
pre_tax_price: item.total_tax_amount,
after_tax_price: item.total_non_tax_amount,
spec_id: item.spec.id,
material_id: item.material.id
}
})
this.contents = contents;
console.log(this.contents)
this.type = res.data.material.state
})
},
onButtonClick(event){
uni.showModal({
title: '温馨提示',

39
canteen/pages/delivery/order.vue

@ -12,7 +12,7 @@
@scrolltolower="scrolltolower"
:refresher-triggered="tabItem.isRefresher"
@refresherrefresh="onRefresherrefresh">
<view class="card" v-for="(item, index) in tabItem.list" :key="item.id" @click="$url('/pages/delivery/detail?id='+ item.id)">
<view class="card" v-for="(item, index) in tabItem.list" :key="item.id" @click="$url('/pages/delivery/detail?id='+ item.o_sn)">
<view class="lf-row-between item">
<view class="lf-color-gray">申请人</view>
<view class="lf-color-black">{{ item.o_name }}</view>
@ -67,7 +67,8 @@
..._public
}],
page_size: 10,
windowHeight: 0
windowHeight: 0,
stateText: ''
}
},
computed: {
@ -91,18 +92,30 @@
methods: {
// TODO
getData(options){
// if(this.current == 1) {
// this.stateText = ''
// }else if(this.current == 2) {
// this.stateText = ''
// }else {
// this.stateText = ''
// }
let item = this.tab_list[this.current];
this.$http(this.API.API_CANTEEN_WAREHOUSEOUTLIST).then(res => {
this.$http(this.API.API_CANTEEN_WAREHOUSEOUTLIST,{
page: item.page,
pagesize: 10,
state: this.current
}).then(res => {
console.log("getData", res);
this.tab_list[this.current].list = res.data.list || [];
let list = res.data.list || [];
// let isPage res.data.isPage;
// if(!isPage){
// item.loading_class = false;
// item.loading_text = '~';
// }
// item.isPage = isPage;
let isPage = res.data.hasmore;
if(!isPage){
item.loading_class = false;
item.loading_text = '已加载全部数据~';
}
item.isPage = isPage;
uni.stopPullDownRefresh()
if(options && options.refresh){
item.isRefresher = false;
@ -118,7 +131,7 @@
tabsChange(current){
this.current = current;
if(this.tab_list[this.current].list.length <= 0){
this.getData();
this.getData({type: this.current});
}
},
// swiper
@ -126,7 +139,7 @@
this.current = event.detail.current;
if(event.detail.source == '') return; //
if(this.tab_list[this.current].list.length <= 0){
this.getData();
this.getData({type: this.current});
}
},
//
@ -134,7 +147,7 @@
let item = this.tab_list[this.current];
if(item.isPage){
item.page++;
this.getData();
this.getData({type: this.current});
}
},
//
@ -147,7 +160,7 @@
item.loading_class = true;
item.loading_text = '正在加载中...';
item.list = [];
this.getData({refresh: true});
this.getData({refresh: true,type: this.current});
}, 200);
}
}

27
canteen/pages/purchase/detail.vue

@ -108,12 +108,30 @@
},{
key: 'spec',
label: '规格'
},{
key: 'brand',
label: '品牌'
},{
key: 'quality_level',
label: '品级'
},{
label: '编号',
key: 'm_sn'
},{
label: '供应商',
key: 'supplier_name'
},{
key: 'pre_tax_price',
label: '税前价格'
},{
key: 'after_tax_price',
label: '税后价格'
},{
key: 'purchase_limit',
label: '起购数'
},{
key: 'purchase_number',
label: '采购数量'
}],
contents: [],
order: {},
@ -219,13 +237,18 @@
return {
name: item.material.m_name,
spec: item.spec.name,
brand: item.material.brand,
quality_level: item.material.quality_level,
m_sn: item.material.m_sn,
supplier_name: this.order.supplier.supplier_name,
pre_tax_price: item.total_tax_amount,
after_tax_price: item.total_non_tax_amount,
spec_id: item.spec.id,
material_id: item.material.id
purchase_limit: item.p_order_item.purchase_limit,
purchase_number: item.purchase_number
}
})
this.contents = contents;
console.log(this.contents)
this.type = res.data.order.state
})
},

26
canteen/pages/purchase/order.vue

@ -114,22 +114,22 @@
//
getData(options){
let item = this.tab_list[this.current];
let tabType = 0
if(this.current == 2) {
tabType = 3
}else if(this.current == 3){
tabType = 4
}else if(this.current == 4){
tabType = 5
}else if(this.current == 5){
tabType = 7
}else {
tabType = this.current
}
// let tabType = 0
// if(this.current == 2) {
// tabType = 3
// }else if(this.current == 3){
// tabType = 4
// }else if(this.current == 4){
// tabType = 5
// }else if(this.current == 5){
// tabType = 7
// }else {
// tabType = this.current
// }
this.$http(this.API.API_CANTEEN_PURCHASEORDERLIST, {
page: item.page,
page_size: this.page_size,
state: tabType || ''
state: this.current || ''
}).then(res => {
console.log("getData", res);
let list = res.data.list || {};

2
supplier/common/api.js

@ -2,7 +2,7 @@
export const DEV = "dev"; // dev 测试 | prod 正式
export const VERSION = '1.0.0'; // 版本号
// export const DEVURL = 'http://192.168.3.78'; // 测试服请求地址
export const DEVURL = 'http://192.168.3.5'; // 测试服请求地址
export const DEVURL = 'http://fsc.lanzulive.com'; // 测试服请求地址
export const PRODURL = ''; // 正式服请求地址
export const API_SUPPLIER_INDEX = '/api/supplier/index'; // 落地页

2
supplier/pages/gonghuo/order.vue

@ -109,7 +109,7 @@
let item = this.tab_list[this.current];
let state = item.name == '全部' ? '' : item.name;
this.$http(this.API.API_SUPPLIER_PURCHASEORDERLIST, {
state: state,
state: this.current,
page: item.page,
page_size: this.page_size
}).then(res => {

2
supplier/pages/order/index.vue

@ -85,7 +85,7 @@
getData(options){
let item = this.tab_list[this.current];
this.$http(this.API.API_SUPPLIER_QUOTATIONORDERLIST, {
state: item.state_name,
state: this.current,
page: item.page,
page_size: this.page_size
}).then(res => {

Loading…
Cancel
Save