diff --git a/canteen/common/shared.js b/canteen/common/shared.js
index fe81a86..9c743c0 100644
--- a/canteen/common/shared.js
+++ b/canteen/common/shared.js
@@ -31,7 +31,7 @@ export function isValueType(value) {
export function recordTime(time = new Date(), separator = "-", swf = 'all'){
let year = time.getFullYear();
let month = time.getMonth() + 1;
- let day = time.getDate()+1;
+ let day = time.getDate()+1; // date天数加1
let hour = time.getHours();
let min = time.getMinutes();
let ppn = time.getSeconds();
diff --git a/canteen/pages/delivery/apply.vue b/canteen/pages/delivery/apply.vue
index ba654aa..38b6ffa 100644
--- a/canteen/pages/delivery/apply.vue
+++ b/canteen/pages/delivery/apply.vue
@@ -51,6 +51,12 @@
},{
label: '规格',
key: 'spec_name'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
key: 'brand',
label: '品牌'
@@ -103,6 +109,8 @@
for(let i in warehouse_list){
warehouse_list[i].delivery_number = {edit: true, value: warehouse_list[i].delivery_number || 1};
warehouse_list[i].operation = {button: true, key: 'delete', value: '删除'};
+ warehouse_list[i].unit = warehouse_list[i].unit.unit_name;
+ warehouse_list[i].category = warehouse_list[i].category.m_cate_name;
contents.push(warehouse_list[i]);
}
this.contents = contents;
@@ -133,7 +141,9 @@
spec_id: item?.spec?.id || 0,
spec_name: item?.spec?.name || '',
supplier_name: item?.purchase?.supplier?.supplier_name || '',
- delivery_number: item.out_number || 1
+ delivery_number: item.out_number || 1,
+ unit: item?.material?.unit || {},
+ category: item?.material?.category || {}
};
})
this.warehouse_list = warehouse_list;
@@ -157,10 +167,22 @@
// table操作按钮被点击
onButtonClick(event){
if(event.content.key == 'delete'){
+ let material_index = event.contentIndex;
+ let material_name = event.lineData.material_name;
+ let spec_name = event.lineData.spec_name;
let order_id = event.lineData.order_id;
- let material_index = event.lineData.contentIndex;
- this.contents.splice(material_index, 1);
- delete this.warehouse_list[order_id];
+ uni.showModal({
+ title: '温馨提示',
+ content: `确定删除 ${material_name}-${spec_name} 吗?`,
+ cancelColor: '#11D189',
+ confirmColor: '#FF0000',
+ success: result => {
+ if(result.confirm){
+ this.contents.splice(material_index, 1);
+ delete this.warehouse_list[order_id];
+ }
+ }
+ })
}
},
// 保存,出库
diff --git a/canteen/pages/delivery/order.vue b/canteen/pages/delivery/order.vue
index 35897e9..bdba113 100644
--- a/canteen/pages/delivery/order.vue
+++ b/canteen/pages/delivery/order.vue
@@ -168,7 +168,7 @@
height: max-content;
background-color: #FFFFFF;
border-radius: 20rpx;
- padding: 0 20rpx;
+ padding: 10rpx 30rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.item{
diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue
index 23e9412..c45a045 100644
--- a/canteen/pages/purchase/detail.vue
+++ b/canteen/pages/purchase/detail.vue
@@ -12,7 +12,7 @@
-
+
@@ -125,6 +125,12 @@
},{
key: 'spec',
label: '规格'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
key: 'brand',
label: '品牌'
@@ -140,9 +146,15 @@
},{
key: 'pre_tax_price',
label: '税前价格'
+ },{
+ key: 'total_tax_amount',
+ label: '含税合计'
},{
key: 'after_tax_price',
label: '税后价格'
+ },{
+ key: 'total_non_tax_amount',
+ label: '不含税合计'
},{
key: 'purchase_limit',
label: '起购数'
@@ -285,7 +297,11 @@
pre_tax_price: item.total_tax_amount,
after_tax_price: item.total_non_tax_amount,
purchase_limit: item.p_order_item.purchase_limit,
- purchase_number: item.purchase_number
+ purchase_number: item.purchase_number,
+ unit: item?.material?.unit?.unit_name || '',
+ category: item?.material?.category?.m_cate_name || '',
+ total_tax_amount: item.total_tax_amount,
+ total_non_tax_amount: item.total_non_tax_amount
}
})
this.contents = contents;
diff --git a/canteen/pages/purchase/launch.vue b/canteen/pages/purchase/launch.vue
index d21ccf9..c48e314 100644
--- a/canteen/pages/purchase/launch.vue
+++ b/canteen/pages/purchase/launch.vue
@@ -108,6 +108,12 @@
},{
key: 'spec_name',
label: '规格'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
key: 'brand',
label: '品牌'
@@ -144,6 +150,8 @@
material_list[i].material_list[j].supplier_name = material_list[i].supplier_name;
material_list[i].material_list[j].tax_price = material_list[i].material_list[j].tax_price;
material_list[i].material_list[j].non_tax_price = material_list[i].material_list[j].non_tax_price;
+ material_list[i].material_list[j].unit = material_list[i].material_list[j].unit.unit_name;
+ material_list[i].material_list[j].category = material_list[i].material_list[j].category.m_cate_name;
list_arr.push(material_list[i].material_list[j]);
}
material_list[i].material_list = list_arr;
@@ -179,7 +187,9 @@
supplier_id: item.id,
supplier_name: item.supplier_name,
tax_price: i_item.tax_price,
- purchase_number: i_item.purchase_number
+ purchase_number: i_item.purchase_number,
+ unit: i_item?.material?.unit || {},
+ category: i_item?.material?.category || {}
};
if(i_item?.material?.state && i_item?.material?.state != '启用'){
items_obj[i_item.quotation_item_id].disabled = true;
@@ -220,13 +230,24 @@
},
// table 操作按钮被点击
onButtonClick(event){
- console.log("event", event);
if(event.content.key == 'delete'){
- let supplier_id = event.lineData.supplier_id; // 取出第一层,供应商id
- let item_id = event.lineData.item_id; // 取出第二层,item_id
- let material_index = event.lineData.contentIndex; // 取出第二层,物资下标
- this.render_material_list[supplier_id].material_list.splice(material_index, 1);
- delete this.material_list[supplier_id].material_list[item_id];
+ let material_index = event.contentIndex;
+ let material_name = event.lineData.material_name;
+ let spec_name = event.lineData.spec_name;
+ let supplier_id = event.lineData.supplier_id;
+ let item_id = event.lineData.item_id;
+ uni.showModal({
+ title: '温馨提示',
+ content: `确定删除 ${material_name}-${spec_name} 吗?`,
+ cancelColor: '#11D189',
+ confirmColor: '#FF0000',
+ success: result => {
+ if(result.confirm){
+ this.render_material_list[supplier_id].material_list.splice(material_index, 1);
+ delete this.material_list[supplier_id].material_list[item_id];
+ }
+ }
+ })
}
},
// 时间选择
diff --git a/canteen/pages/purchase/order.vue b/canteen/pages/purchase/order.vue
index f9036cd..2cf72cd 100644
--- a/canteen/pages/purchase/order.vue
+++ b/canteen/pages/purchase/order.vue
@@ -213,7 +213,7 @@
height: max-content;
background-color: #FFFFFF;
border-radius: 20rpx;
- padding: 0 20rpx;
+ padding: 10rpx 30rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.item{
diff --git a/supplier/pages/gonghuo/detail.vue b/supplier/pages/gonghuo/detail.vue
index 7829638..1628e82 100644
--- a/supplier/pages/gonghuo/detail.vue
+++ b/supplier/pages/gonghuo/detail.vue
@@ -147,6 +147,12 @@
},{
key: 'spec',
label: '规格'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
key: 'brand',
label: '品牌'
@@ -242,7 +248,9 @@
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
+ purchase_number: item.purchase_number,
+ unit: item?.material?.unit?.unit_name || '',
+ category: item?.material?.category?.m_cate_name || ''
}
return obj;
});
@@ -378,7 +386,8 @@
.info{
display: flex;
flex-direction: column;
- justify-content: space-around;
+ // justify-content: space-around;
+ justify-content: space-between;
width: 530rpx;
height: 140rpx;
}
diff --git a/supplier/pages/gonghuo/order.vue b/supplier/pages/gonghuo/order.vue
index 902ca09..5b025ce 100644
--- a/supplier/pages/gonghuo/order.vue
+++ b/supplier/pages/gonghuo/order.vue
@@ -187,7 +187,7 @@
height: max-content;
background-color: #FFFFFF;
border-radius: 20rpx;
- padding: 0 20rpx;
+ padding: 10rpx 30rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.item{
diff --git a/supplier/pages/offer/index.vue b/supplier/pages/offer/index.vue
index 49bcdfa..0c8f5ec 100644
--- a/supplier/pages/offer/index.vue
+++ b/supplier/pages/offer/index.vue
@@ -60,6 +60,12 @@
},{
label: '规格',
key: 'spec'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
label: '品牌',
key: 'brand'
@@ -154,7 +160,9 @@
purchase_limit: {edit: true, value: 1},
tax_price: {edit: true, value: ''},
non_tax_price: {edit: true, value: ''},
- operation: {button: true, key: 'delete', value: '删除'}
+ operation: {button: true, key: 'delete', value: '删除'},
+ unit: item?.material?.unit?.unit_name || '',
+ category: item?.material?.category?.m_cate_name || ''
}
})
this.contents = contents;
@@ -182,7 +190,9 @@
tax_price: {edit: true, value: item?.quotation?.tax_price || ''},
non_tax_price: {edit: true, value: item?.quotation?.non_tax_price || ''},
quotation_id: item?.quotation?.id || 0,
- operation: {button: true, key: 'delete', value: '删除'}
+ operation: {button: true, key: 'delete', value: '删除'},
+ unit: item?.material?.unit?.unit_name || '',
+ category: item?.material?.category?.m_cate_name || ''
}
if(item?.material?.state && item?.material?.state != '启用'){
obj.disabled = true;
@@ -241,8 +251,19 @@
// table操作按钮被点击
onButtonClick(event){
if(event.content.key == 'delete'){
- let contentIndex = event.lineData.contentIndex;
- this.contents.splice(contentIndex, 1);
+ let contentIndex = event.contentIndex;
+ let name = event.lineData.name;
+ let spec = event.lineData.spec;
+ uni.showModal({
+ title: '温馨提示',
+ content: `确定删除 ${name}-${spec} 吗?`,
+ confirmColor: '#1833F2',
+ success: result => {
+ if(result.confirm){
+ this.contents.splice(contentIndex, 1);
+ }
+ }
+ })
}
},
// 切换显示关联食堂modal
diff --git a/supplier/pages/order/detail.vue b/supplier/pages/order/detail.vue
index 38b0db0..6cbda4d 100644
--- a/supplier/pages/order/detail.vue
+++ b/supplier/pages/order/detail.vue
@@ -69,6 +69,12 @@
},{
label: '规格',
key: 'spec'
+ },{
+ label: '单位',
+ key: 'unit'
+ },{
+ label: '分类',
+ key: 'category'
},{
label: '品牌',
key: 'brand'
@@ -146,7 +152,9 @@
number: item?.material?.m_sn || '',
tax_price: item.tax_price,
non_tax_price: item.non_tax_price,
- purchase_limit: item.purchase_limit
+ purchase_limit: item.purchase_limit,
+ unit: item?.material?.unit?.unit_name || '',
+ category: item?.material?.category?.m_cate_name || ''
}
return obj;
});
diff --git a/supplier/pages/order/index.vue b/supplier/pages/order/index.vue
index 13e1779..16f4684 100644
--- a/supplier/pages/order/index.vue
+++ b/supplier/pages/order/index.vue
@@ -166,7 +166,7 @@
height: max-content;
background-color: #FFFFFF;
border-radius: 20rpx;
- padding: 0 20rpx;
+ padding: 10rpx 30rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.item{