diff --git a/canteen/pages/purchase/launch.vue b/canteen/pages/purchase/launch.vue index ae16a1d..9705684 100644 --- a/canteen/pages/purchase/launch.vue +++ b/canteen/pages/purchase/launch.vue @@ -32,7 +32,7 @@ 物资明细 - + {{ value.supplier_name }} 删除 @@ -146,14 +146,17 @@ if(material_item.purchase_limit <= detailValue){ material_item.purchase_number.value = detailValue; // 将输入的值赋值给物资 }else{ - uni.showModal({ - title: '温馨提示', - content: '采购数量必须大于起购数量', - showCancel: false, - success: result => { - material_item.purchase_number.value = material_item.purchase_limit; - } - }) + this.$msg('采购数量须大于起购数量'); + material_item.purchase_number.value = material_item.purchase_limit; + + // uni.showModal({ + // title: '温馨提示', + // content: '采购数量必须大于起购数量', + // showCancel: false, + // success: result => { + // material_item.purchase_number.value = material_item.purchase_limit; + // } + // }) } console.log("render_material_list_change", this.render_material_list); }, diff --git a/supplier/pages/gonghuo/detail.vue b/supplier/pages/gonghuo/detail.vue index 7e41c92..c6d78f2 100644 --- a/supplier/pages/gonghuo/detail.vue +++ b/supplier/pages/gonghuo/detail.vue @@ -21,23 +21,24 @@ 物资明细 - + - + - + - - 已完成 + + + {{ type }} - - 已退单 + + {{ type }} @@ -101,24 +102,39 @@ return { stepList: [], headers: [{ - label: '菜品名称', - key: 'name' + key: 'm_name', + label: '物资名称' + },{ + key: 'spec', + label: '规格' + },{ + key: 'brand', + label: '品牌' + },{ + key: 'quality_level', + label: '品级' + },{ + label: '编号', + key: 'm_sn' + },{ + key: 'tax_price', + label: '含税价' },{ - label: '规格', - key: 'spec' + key: 'non_tax_price', + label: '不含税价' },{ - label: '税前价', - key: 'pre_tax_price' + key: 'purchase_limit', + label: '起购数' },{ - label: '税后价', - key: 'after_tax_price' + key: 'purchase_number', + label: '采购数量' }], contents: [], is_show_voucher: false, // 是否显示凭证上传弹出层 is_show_receiving: false, voucher_list: [], // 已上传的凭证列表 voucher_count: 6, // 最多可以上传多少张凭证 - type: 2, // 订单状态 + type: '', // 订单状态 p_sn: '', order: {}, l_p_num: '', @@ -127,8 +143,6 @@ } }, onLoad(options){ - // todo 缺少待收货状态 - // todo 供货确认发货后,待收货状态加一个按钮,上传凭证(如果他前面还没有上传) this.p_sn = options.p_sn; this.getData(); }, @@ -139,6 +153,7 @@ }).then(res => { console.log("getData", res); let order = res.data.order || {}; + this.type = order.state; this.order = order; this.stepList = order.state_log.map((item, index) => { item.isFinished = false; @@ -150,23 +165,25 @@ return item; }) - // todo contents换成接口返回的值 - - }); - }, - // 监听table删除操作 - onButtonClick(event){ - uni.showModal({ - title: '温馨提示', - content: '您确定移除该项吗?', - success: result => { - if(result.confirm){ - console.log("移除某一项", event); - let { contentIndex } = event; - this.contents.splice(contentIndex, 1); + let list = order.items || []; + let contents = list.map(item => { + let obj = { + m_name: item.material?.m_name || '', + material_id: item.material?.id, + spec: item.spec?.name || '', + spec_id: item.spec?.id, + brand: item?.material?.brand || '', + quality_level: item?.material?.quality_level || '', + m_sn: item?.material?.m_sn || '', + tax_price: item.tax_price, + non_tax_price: item.non_tax_price, + purchase_limit: item?.p_order_item?.purchase_limit || '', + purchase_number: item.purchase_number } - } - }) + return obj; + }); + this.contents = contents; + }); }, // 上传凭证图片 uploadImage(){ @@ -218,7 +235,7 @@ Promise.all(http_list).then(res => { console.log("上传完毕", res); - let images = res.map(item => item.url); + let images = res.map(item => item.path); that.$http(that.API.API_SUPPLIER_PURCHASESAVEVOUCHER, { p_sn: that.p_sn, images: images, @@ -243,8 +260,8 @@ this.$http(this.API.API_SUPPLIER_PURCHASEORDERACCEPT, { p_sn: this.p_sn }).then(res => { - console.log("orderTaking", res); - this.$msg('接单成功') + this.$msg('接单成功'); + this.getData(); }); }, // 确认发货 @@ -266,8 +283,8 @@ deliver_man: driver_name, car_license: l_p_num }).then(res => { - console.log("confirmDeliver", res); - this.$msg('确认收货成功') + this.$msg('确认收货成功'); + this.getData(); }); } } diff --git a/supplier/pages/gonghuo/order.vue b/supplier/pages/gonghuo/order.vue index a5ae03d..b0cd41a 100644 --- a/supplier/pages/gonghuo/order.vue +++ b/supplier/pages/gonghuo/order.vue @@ -15,19 +15,19 @@ 采购方 - {{ item.contact_name }} + {{ item.p_name }} 发单时间 - {{ item.receiving_start }} + {{ item.deadline_text }} 送达时间 - {{ item.receiving_end }} + {{ item.receive_time }} 商品种类 - 8类 + {{ item.cate_number }} 订单状态 @@ -58,27 +58,22 @@ current: 0, tab_list: [{ name: '全部', - state_name: '', list: [], ..._public },{ name: '待接单', - state_name: '待接单', list: [], ..._public },{ name: '待发货', - state_name: '待发货', list: [], ..._public },{ name: '已完成', - state_name: '已完成', list: [], ..._public },{ name: '已退单', - state_name: '已退单', list: [], ..._public }], @@ -93,8 +88,9 @@ methods: { getData(options){ let item = this.tab_list[this.current]; + let state = item.name == '全部' ? '' : item.name; this.$http(this.API.API_SUPPLIER_PURCHASEORDERLIST, { - state: item.state_name, + state: state, page: item.page, page_size: this.page_size }).then(res => { diff --git a/supplier/pages/index/index.vue b/supplier/pages/index/index.vue index 29998af..f5ba168 100644 --- a/supplier/pages/index/index.vue +++ b/supplier/pages/index/index.vue @@ -19,7 +19,7 @@ - +