diff --git a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/InEdit.vue b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/InEdit.vue
index da95115..91d2ee9 100644
--- a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/InEdit.vue
+++ b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/InEdit.vue
@@ -104,7 +104,8 @@ export default {
warehouse_id: 0,
version: '',
is_default: 0,
- processing_cost: 11,
+ purchase_cost: 0,
+ processing_cost: 0,
},
// 标题宽度
titleWidth: 100,
@@ -204,7 +205,6 @@ export default {
{field: 'delivery_no', title: '发货单号', span: 12, itemRender: {name: '$input'}},
- {field: 'contact', title: '联系人', span: 12, itemRender: {name: '$input'}},
{
field: 'purchase_cost',
title: '采购成本',
@@ -220,6 +220,7 @@ export default {
itemRender: {name: '$input', props: {type: "number"}},
},
+ {field: 'contact', title: '联系人', span: 12, itemRender: {name: '$input'}},
{field: 'phone', title: '联系电话', span: 12, itemRender: {name: '$input'}},
{field: 'remark', title: '备注', span: 24, itemRender: {name: '$textarea'}},
]
@@ -288,7 +289,8 @@ export default {
this.stock_out = a.data.stock_out;
console.log(" this.warehouse_idetail:", this.warehouse_idetail)
console.log(" this.warehouse_pos_idetail:", this.warehouse_pos_idetail)
-
+ this.formOptions.data.purchase_cost = this.product_detail.purchase_cost;
+ this.formOptions.data.processing_cost = this.product_detail.processing_cost;
}).catch((a) => {
this.$mk.error(a.data.msg);
});
diff --git a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/LogDetail.vue b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/LogDetail.vue
index 2e990a9..53cc6b7 100644
--- a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/LogDetail.vue
+++ b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/LogDetail.vue
@@ -3,7 +3,7 @@
- 打印预览
+ 打印单据
{{ title }}
@@ -32,27 +32,43 @@
单价
- {{ formOptions.data.price|formatNumber }} 元
+ {{ formOptions.data.price|formatMoney }}
|
总价
|
- {{ formOptions.data.total_price|formatNumber }} 元
+ {{ formOptions.data.total_price|formatMoney }}
|
|
采购成本
|
-
- {{ formOptions.data.purchase_cost|formatNumber }} 元
+ |
+ {{ formOptions.data.purchase_cost|formatMoney }}
|
加工成本
|
-
- {{ formOptions.data.processing_cost|formatNumber }} 元
+ |
+ {{ formOptions.data.processing_cost|formatMoney }}
+ |
+
+ 单件成本
+ |
+
+ {{
+ (formOptions.data.purchase_cost + formOptions.data.processing_cost)|formatMoney
+ }}
+ |
+
+ 总成本
+ |
+
+ {{
+ (formOptions.data.purchase_cost + formOptions.data.processing_cost) * formOptions.data.in_stock|formatMoney
+ }}
|
@@ -60,7 +76,7 @@
入库数量
|
- {{ formOptions.data.in_stock }}
+ {{ formOptions.data.in_stock }} {{ formOptions.data.product_detail.unit }}
|
单据日期
@@ -473,9 +489,9 @@ export default {
this.formOptions.data = a.data[detailDataFieldName];
if (this.formOptions.data.out_time === 0) {
- this.title = "入库单据"
+ this.title = "入库信息"
} else {
- this.title = "出库单据"
+ this.title = "出库信息"
}
this.product_detail = this.formOptions.data.product_detail
@@ -645,6 +661,12 @@ export default {
}
return cellValue.toFixed(2);
},
+ formatMoney(cellValue) {
+ if (!cellValue) {
+ return '-';
+ }
+ return cellValue.toFixed(2) + " 元"
+ },
},
// 监听属性
diff --git a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/OutEdit.vue b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/OutEdit.vue
index 824a76d..917ff59 100644
--- a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/OutEdit.vue
+++ b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/OutEdit.vue
@@ -276,6 +276,8 @@ export default {
console.log(" this.stock_in:", this.stock_in)
this.stock_out = a.data.stock_out;
console.log(" this.stock_out:", this.stock_out)
+ this.formOptions.data.purchase_cost = this.product_detail.purchase_cost;
+ this.formOptions.data.processing_cost = this.product_detail.processing_cost;
}).catch((a) => {
this.$mk.error(a.data.msg);
});
diff --git a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/data2.json b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/data2.json
index fb6cf75..7fbfadb 100644
--- a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/data2.json
+++ b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/data2.json
@@ -3,7 +3,7 @@
{
"index": 0,
"name": 1,
- "height": 296.6,
+ "height": 120,
"width": 210,
"paperHeader": 82.5,
"paperFooter": 802.5,
diff --git a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/preview.vue b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/preview.vue
index b88211d..101d39f 100644
--- a/src/pages/Middle/Mes/MesStock/MesStock/OutIn/preview.vue
+++ b/src/pages/Middle/Mes/MesStock/MesStock/OutIn/preview.vue
@@ -47,6 +47,9 @@ export default {
this.visible = false
},
show(hiprintTemplate, printData, width = '210') {
+ console.log("hiprintTemplate:", hiprintTemplate)
+ console.log("printData:", printData)
+
this.visible = true
this.spinning = true
this.width = hiprintTemplate.editingPanel ? hiprintTemplate.editingPanel.width : width;
@@ -55,6 +58,7 @@ export default {
//this.hiprintTemplate.print(this.printData);
+
setTimeout(() => {
// eslint-disable-next-line no-undef
$('#preview_content_custom').html(hiprintTemplate.getHtml(printData))
|