diff --git a/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue b/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
index 19493012..e3a00ee1 100644
--- a/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
+++ b/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
@@ -87,7 +87,7 @@
货品信息
- 添加货品
+
导入采购订单
删除
@@ -108,18 +108,20 @@
-->
-
- (scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
+
+ {{ (scope.row.unitPrice/100).toFixed(2) }}
+
- (scope.row.orderNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
+ {{scope.row.orderNum}}
+
- {{ scope.row.orderNum*scope.row.unitPrice }}
+ {{ (scope.row.orderNum*scope.row.unitPrice/100).toFixed(2) }}
@@ -397,10 +399,7 @@ export default {
//查询查询食堂下拉结构
getPurchaseInspectInfoApi(param).then((response) => {
this.baseInfo = response.data;
- this.materialList = this.baseInfo.inspectGoodsDetails;
- this.materialList.forEach(item=>{
- this.$set(item,"unitPrice",Number(item.unitPrice)/100)
- })
+ this.materialList = this.baseInfo.inspectGoodsDetails;
if(this.baseInfo.inspectAttachmentList.length>0){
this.baseInfo.inspectAttachmentList.forEach(item=>{
this.attachmentList.push({name:item,url:item})
@@ -532,12 +531,11 @@ export default {
confirmChosen(){
if(this.batchChosenMaterial.length>0){
this.loading = true
- this.materialList = []
- this.batchChosenMaterial.forEach(item=>{
- let obj = Object.assign({}, item)
- obj.unitPrice = item.unitPrice/100;
- this.materialList.push(obj)
- })
+ this.materialList = this.batchChosenMaterial
+ // this.batchChosenMaterial.forEach(item=>{
+ // let obj = Object.assign({}, item)
+ // this.materialList.push(obj)
+ // })
setTimeout(()=>{
this.loading = false
this.openDialog=false
@@ -563,12 +561,10 @@ export default {
this.noMaterial = false;
if(this.materialList.length>0){
this.materialList.forEach(item=>{
- if(item.unitPrice==0 || item.orderNum==0){
+ if(item.deliveryNum==0 || item.qualifiedNum==0){
this.noMaterial = true
- }else{
- let obj = Object.assign({}, item)
- obj.unitPrice = Number(obj.unitPrice)*100
- // obj.totalPrice = (Number(obj.unitPrice)*Number(obj.orderNum))
+ }else{
+ let obj = Object.assign({}, item)
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
param.inspectGoodsDetails.push(obj)
@@ -629,12 +625,10 @@ export default {
this.noMaterial = false;
if(this.materialList.length>0){
this.materialList.forEach(item=>{
- if(item.unitPrice==0 || item.orderNum==0){
+ if(item.deliveryNum==0 || item.qualifiedNum==0){
this.noMaterial = true
}else{
- let obj = Object.assign({}, item)
- obj.unitPrice = Number(obj.unitPrice)*100
- // obj.totalPrice = (Number(obj.unitPrice)*Number(obj.orderNum))
+ let obj = Object.assign({}, item)
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
param.inspectGoodsDetails.push(obj)
@@ -642,7 +636,7 @@ export default {
})
}
if(this.noMaterial){
- this.$modal.msgError("请输入单价和数量!");
+ this.$modal.msgError("请输入表格数据!");
}else{
this.noMaterial = true;
if(this.materialList.length>0){
@@ -728,7 +722,7 @@ export default {
if(this.materialDetailsData.length>0){
this.materialList = this.materialDetailsData;
this.materialList.forEach(item=>{
- this.$set(item,"unitPrice",Number(item.singlePrice)/100)
+ this.$set(item,"unitPrice",Number(item.singlePrice))
this.$set(item,"orderNum",item.orderNum)
})
this.baseInfo.relateOrderGoodsId = this.importRow.orderGoodsCode;
diff --git a/src/views/foodManage/purchaseManage/purchasePlan/edit.vue b/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
index 4dc600c3..2bd94325 100644
--- a/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
+++ b/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
@@ -153,7 +153,7 @@
称重
-->
-
+
{{ (scope.row.unitPrice/100).toFixed(2)||"" }}
diff --git a/src/views/foodManage/stockManage/depotManage/materialStock.vue b/src/views/foodManage/stockManage/depotManage/materialStock.vue
index 8f73c2df..13443ca2 100644
--- a/src/views/foodManage/stockManage/depotManage/materialStock.vue
+++ b/src/views/foodManage/stockManage/depotManage/materialStock.vue
@@ -120,14 +120,14 @@
v-model="form.minNum"
type="text" clearable
placeholder="请输入最小库存"
- maxlength="7" @input="(v)=>(form.minNum=v.replace(/[^\d]/g,''))"
+ maxlength="7" @input="(v)=>(form.minNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"
/>
(form.maxNum=v.replace(/[^\d]/g,''))"
+ maxlength="7" @input="(v)=>(form.maxNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"
/>