From d62e08bce436ab6d360789e92de6935fff246470 Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Sat, 31 Jul 2021 20:47:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=20?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E8=AF=A6=E6=83=85(=E5=BE=85=E4=BC=98?= =?UTF-8?q?=E5=8C=96)=E7=AD=89=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- canteen/common/api.js | 7 +- canteen/pages/delivery/detail.vue | 131 +++++++++++++++++------------- canteen/pages/delivery/order.vue | 18 ++-- canteen/pages/purchase/detail.vue | 1 + canteen/pages/purchase/order.vue | 26 +++--- supplier/common/api.js | 2 +- supplier/pages/gonghuo/order.vue | 2 +- supplier/pages/order/index.vue | 2 +- 8 files changed, 104 insertions(+), 85 deletions(-) diff --git a/canteen/common/api.js b/canteen/common/api.js index ae30b0b..d62bfdf 100644 --- a/canteen/common/api.js +++ b/canteen/common/api.js @@ -2,8 +2,8 @@ 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://fsc.lanzulive.com'; // 测试服请求地址 +// 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'; // 改变采购单状态 diff --git a/canteen/pages/delivery/detail.vue b/canteen/pages/delivery/detail.vue index c051fd8..5cd22ad 100644 --- a/canteen/pages/delivery/detail.vue +++ b/canteen/pages/delivery/detail.vue @@ -26,9 +26,24 @@ - - - + @@ -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: '温馨提示', diff --git a/canteen/pages/delivery/order.vue b/canteen/pages/delivery/order.vue index cbb909c..d589080 100644 --- a/canteen/pages/delivery/order.vue +++ b/canteen/pages/delivery/order.vue @@ -12,7 +12,7 @@ @scrolltolower="scrolltolower" :refresher-triggered="tabItem.isRefresher" @refresherrefresh="onRefresherrefresh"> - + 申请人 {{ item.o_name }} @@ -92,18 +92,18 @@ methods: { // 获取数据 TODO 目前接口还没有数据 getData(options){ - if(this.current == 1) { - this.stateText = '待确认' - }else if(this.current == 2) { - this.stateText = '已出库' - }else { - this.stateText = '' - } + // 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,{ page: item.page, pagesize: 10, - state: this.stateText + state: this.current }).then(res => { console.log("getData", res); this.tab_list[this.current].list = res.data.list || []; diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue index 87237f7..65dc088 100644 --- a/canteen/pages/purchase/detail.vue +++ b/canteen/pages/purchase/detail.vue @@ -226,6 +226,7 @@ } }) this.contents = contents; + console.log(this.contents) this.type = res.data.order.state }) }, diff --git a/canteen/pages/purchase/order.vue b/canteen/pages/purchase/order.vue index ea430f8..7f46978 100644 --- a/canteen/pages/purchase/order.vue +++ b/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 || {}; diff --git a/supplier/common/api.js b/supplier/common/api.js index 97c2ed0..6cb1ab8 100644 --- a/supplier/common/api.js +++ b/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'; // 落地页 diff --git a/supplier/pages/gonghuo/order.vue b/supplier/pages/gonghuo/order.vue index b0cd41a..013ad23 100644 --- a/supplier/pages/gonghuo/order.vue +++ b/supplier/pages/gonghuo/order.vue @@ -90,7 +90,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 => { diff --git a/supplier/pages/order/index.vue b/supplier/pages/order/index.vue index 1851705..a3ecd5c 100644 --- a/supplier/pages/order/index.vue +++ b/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 => {