diff --git a/canteen/common/api.js b/canteen/common/api.js
index c049c23..69b4c83 100644
--- a/canteen/common/api.js
+++ b/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'; // 改变采购单状态
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 f2b1f7e..887abc1 100644
--- a/canteen/pages/delivery/apply.vue
+++ b/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
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 08aac23..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 }}
@@ -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);
}
}
diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue
index 87237f7..af9c912 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,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
})
},
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 0400aa2..c9ee4b6 100644
--- a/supplier/pages/gonghuo/order.vue
+++ b/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 => {
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 => {