From 7006e452acfd249c821bf354f49206332a419d93 Mon Sep 17 00:00:00 2001 From: shuixiang Date: Sat, 31 Jul 2021 19:41:05 +0800 Subject: [PATCH 1/3] no message --- canteen/pages/purchase/detail.vue | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue index 87237f7..e856e0e 100644 --- a/canteen/pages/purchase/detail.vue +++ b/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,10 +237,14 @@ 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; From 38330fe15036fe17034ff6efe0463f2d2ee3c792 Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Sat, 31 Jul 2021 19:41:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=87=BA=E5=BA=93=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- canteen/common/api.js | 4 +-- canteen/pages/classification/warehouse.vue | 10 +++--- canteen/pages/delivery/apply.vue | 11 +++++-- canteen/pages/delivery/order.vue | 37 +++++++++++++++------- 4 files changed, 41 insertions(+), 21 deletions(-) diff --git a/canteen/common/api.js b/canteen/common/api.js index fd8a615..ae30b0b 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.3.96'; // 测试服请求地址 export const PRODURL = ''; // 正式服请求地址 export const API_CANTEEN_LOGIN = '/api/canteen/login'; // 登录 diff --git a/canteen/pages/classification/warehouse.vue b/canteen/pages/classification/warehouse.vue index af37bdd..bccb896 100644 --- a/canteen/pages/classification/warehouse.vue +++ b/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) diff --git a/canteen/pages/delivery/apply.vue b/canteen/pages/delivery/apply.vue index 3776533..80e797d 100644 --- a/canteen/pages/delivery/apply.vue +++ b/canteen/pages/delivery/apply.vue @@ -72,6 +72,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; @@ -89,16 +93,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 diff --git a/canteen/pages/delivery/order.vue b/canteen/pages/delivery/order.vue index 08aac23..cbb909c 100644 --- a/canteen/pages/delivery/order.vue +++ b/canteen/pages/delivery/order.vue @@ -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.stateText + }).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); } } 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 3/3] =?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 => {