浏览代码

审批节点可修改包材配件和包装配置

lxf 1 年之前
父节点
当前提交
3bc57f0fbd
共有 2 个文件被更改,包括 35 次插入24 次删除
  1. 34 8
      src/components/process/order.vue
  2. 1 16
      src/views/process/processApproval/index.vue

+ 34 - 8
src/components/process/order.vue

@@ -243,8 +243,11 @@
                 <el-table-column label="包材配件/单品" min-width="600">
                   <template #default="{ row }">
                     <div style="width: 100%">
-                      <div style="margin-bottom: 10px" v-if="!formOption.disabled">
-                        <el-button type="primary" size="small" @click="clickPackingFittings(index)">选择包材配件</el-button>
+                      <div style="margin-bottom: 10px" v-if="!formOption.disabled || route.query.processType == 10">
+                        <el-form label-width="0" :model="formData.data" v-if="route.query.processType == 10">
+                          <el-button type="primary" size="small" @click="clickPackingFittings(index)">选择包材配件</el-button>
+                        </el-form>
+                        <el-button type="primary" size="small" @click="clickPackingFittings(index)" v-else>选择包材配件</el-button>
                       </div>
                       <el-table :data="row.orderSkuBomList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
                         <el-table-column label="单价¥" width="70">
@@ -256,11 +259,29 @@
                         </el-table-column>
                         <el-table-column label="数量" width="90">
                           <template #default="props">
+                            <el-form label-width="0" :model="formData.data" v-if="route.query.processType == 10">
+                              <el-form-item
+                                :prop="'orderSkuList.' + index + '.orderSkuBomList.' + props.$index + '.quantity'"
+                                :rules="rules.quantity"
+                                :inline-message="true"
+                                style="width: 100%"
+                                :disabled="true">
+                                <el-input-number
+                                  onmousewheel="return false;"
+                                  v-model="props.row.quantity"
+                                  placeholder="数量"
+                                  style="width: 100%"
+                                  :controls="false"
+                                  :min="0" />
+                              </el-form-item>
+                            </el-form>
                             <el-form-item
+                              v-else
                               :prop="'orderSkuList.' + index + '.orderSkuBomList.' + props.$index + '.quantity'"
                               :rules="rules.quantity"
                               :inline-message="true"
-                              style="width: 100%">
+                              style="width: 100%"
+                              :disabled="true">
                               <el-input-number
                                 onmousewheel="return false;"
                                 v-model="props.row.quantity"
@@ -282,9 +303,12 @@
                             {{ moneyFormat(computeMoney(index, props.$index), 2) }}
                           </template>
                         </el-table-column>
-                        <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled">
+                        <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled || route.query.processType == 10">
                           <template #default="props">
-                            <el-button type="danger" @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
+                            <el-form label-width="0" :model="formData.data" v-if="route.query.processType == 10">
+                              <el-button type="danger" @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
+                            </el-form>
+                            <el-button type="danger" v-else @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
                           </template>
                         </el-table-column>
                       </el-table>
@@ -413,7 +437,7 @@ const route = useRoute();
 const submit = ref(null);
 const departmentList = ref([]);
 const judgeStatus = () => {
-  if (route.query.processType == 20) {
+  if (route.query.processType == 20 || route.query.processType == 10) {
     return true;
   }
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
@@ -1044,8 +1068,10 @@ const calculatedOuterBoxPackingFee = () => {
   let money = 0;
   if (formData.data.orderPackageBomList && formData.data.orderPackageBomList.length > 0) {
     for (let i = 0; i < formData.data.orderPackageBomList.length; i++) {
-      if (formData.data.orderPackageBomList[i].costPrice && formData.data.orderPackageBomList[i].quantity) {
-        money = Number(Math.round((money + formData.data.orderPackageBomList[i].costPrice * formData.data.orderPackageBomList[i].quantity) * 100) / 100);
+      if (formData.data.orderPackageBomList[i].internalSellingPrice && formData.data.orderPackageBomList[i].quantity) {
+        money = Number(
+          Math.round((money + formData.data.orderPackageBomList[i].internalSellingPrice * formData.data.orderPackageBomList[i].quantity) * 100) / 100
+        );
       }
     }
   }

+ 1 - 16
src/views/process/processApproval/index.vue

@@ -143,7 +143,6 @@
             <el-table-column label="品号" prop="code" width="160" />
             <el-table-column label="品名" prop="name" min-width="220" />
             <el-table-column label="销售单价" prop="internalSellingPrice" width="100" />
-            <el-table-column label="成本单价" prop="costPrice" width="100" />
             <el-table-column label="数量" width="120">
               <template #default="{ row, $index }">
                 <div class="shippingPackage">
@@ -169,11 +168,6 @@
                 {{ moneyFormat(computeMoney(row, "internalSellingPrice"), 2) }}
               </template>
             </el-table-column>
-            <el-table-column label="成本小计" width="120">
-              <template #default="{ row }">
-                {{ moneyFormat(computeMoney(row, "costPrice"), 2) }}
-              </template>
-            </el-table-column>
             <el-table-column label="操作" align="center" fixed="right" width="80">
               <template #default="{ $index }">
                 <el-button type="danger" @click="clickDelete($index)" text>删除</el-button>
@@ -190,7 +184,7 @@
                 v-if="formShippingPackage.data.outerBoxSelfAdhesiveStickerFile && formShippingPackage.data.outerBoxSelfAdhesiveStickerFile.fileUrl"
                 :src="formShippingPackage.data.outerBoxSelfAdhesiveStickerFile.fileUrl"
                 @click="openFile(formShippingPackage.data.outerBoxSelfAdhesiveStickerFile.fileUrl)" />
-              <div style="display: flex">
+              <div style="display: flex" v-if="route.query.processType != 10">
                 <el-upload
                   :show-file-list="false"
                   action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
@@ -249,18 +243,12 @@
           <el-table-column label="品号" prop="code" width="160" />
           <el-table-column label="品名" prop="name" min-width="220" />
           <el-table-column label="销售单价" prop="internalSellingPrice" width="100" />
-          <el-table-column label="成本单价" prop="costPrice" width="100" />
           <el-table-column label="数量" prop="quantity" width="120" />
           <el-table-column label="销售小计" width="120">
             <template #default="{ row }">
               {{ moneyFormat(computeMoney(row, "internalSellingPrice"), 2) }}
             </template>
           </el-table-column>
-          <el-table-column label="成本小计" width="120">
-            <template #default="{ row }">
-              {{ moneyFormat(computeMoney(row, "costPrice"), 2) }}
-            </template>
-          </el-table-column>
         </el-table>
         <div style="font-weight: 700; margin: 20px 0 10px 0">外箱不干胶图稿</div>
         <div style="display: flex; width: 100%">
@@ -573,7 +561,6 @@ const selectExpressPacking = (data) => {
       bomSpecId: data.id,
       code: data.code,
       name: data.name,
-      costPrice: data.costPrice,
       internalSellingPrice: data.internalSellingPrice,
       quantity: undefined,
     });
@@ -583,7 +570,6 @@ const selectExpressPacking = (data) => {
         bomSpecId: data.id,
         code: data.code,
         name: data.name,
-        costPrice: data.costPrice,
         internalSellingPrice: data.internalSellingPrice,
         quantity: undefined,
       },
@@ -657,7 +643,6 @@ const selectAssembly = (item) => {
             bomSpecId: resItem.id,
             code: resItem.code,
             name: resItem.name,
-            costPrice: resItem.costPrice,
             internalSellingPrice: resItem.internalSellingPrice,
             quantity: undefined,
           };