Bläddra i källkod

报价单新需求

cz 1 år sedan
förälder
incheckning
0fab6ea28c

+ 10 - 10
src/components/process/SF/Subscribe.vue

@@ -101,18 +101,18 @@ const formConfig = computed(() => {
       title: "申购信息",
       haveLine: false,
     },
-    {
-      type: "input",
-      prop: "deptName",
-      label: "申购部门",
-      itemWidth: 25,
-      disabled: true,
-    },
+    // {
+    //   type: "input",
+    //   prop: "deptName",
+    //   label: "申购部门",
+    //   itemWidth: 25,
+    //   disabled: true,
+    // },
     {
       type: "input",
       prop: "subcribeName",
       label: "申购人",
-      itemWidth: 25,
+      itemWidth: 33.33,
       disabled: true,
     },
     {
@@ -122,14 +122,14 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 25,
+      itemWidth: 33.33,
     },
     {
       type: "date",
       prop: "subcribeTime",
       itemType: "date",
       label: "申时间",
-      itemWidth: 25,
+      itemWidth: 33.33,
       disabled: false,
     },
     {

+ 59 - 2
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -42,7 +42,7 @@
       </template> -->
     </el-dialog>
 
-    <el-dialog title="到货登记" v-model="arrivalDialog" width="70%" destroy-on-close>
+    <el-dialog title="到货登记" v-model="arrivalDialog" width="80%" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
         <template #details>
           <div style="width:100%;padding:0 15px">
@@ -54,7 +54,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="productCode" label="商品编码" width="160" />
+              <el-table-column prop="productCode" label="商品编码" width="200" />
               <el-table-column prop="productName" label="商品名称" min-width="130" />
               <el-table-column label="尺寸 (cm)" width="140">
                 <template #default="{ row, $index }">
@@ -64,6 +64,7 @@
                 </template>
               </el-table-column>
               <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
+              <el-table-column label="可登记最大数量(105%)" prop="maxQuantity" width="190" />
               <el-table-column label="已到货数量" prop="arrivalQuantity" width="100" />
               <el-table-column prop="quantity" label="到货数量" width="130">
                 <template #default="{ row, $index }">
@@ -76,6 +77,33 @@
             </el-table>
           </div>
         </template>
+
+        <template #details1>
+          <div style="width:100%;padding:0 15px">
+            <el-table :data="formData.data.arrivalDetailListOne">
+              <el-table-column label="到货日期" prop="arrivalTime" width="150" />
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="200" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
+              <el-table-column label="到货数量" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+
       </byForm>
       <template #footer>
         <el-button @click="arrivalDialog = false" size="defualt" v-debounce>取 消</el-button>
@@ -536,6 +564,15 @@ const formConfig = computed(() => {
       slotName: "details",
       label: "",
     },
+    {
+      type: "title1",
+      title: "历史到货登记",
+    },
+    {
+      type: "slot",
+      slotName: "details1",
+      label: "",
+    },
   ];
 });
 
@@ -565,9 +602,11 @@ const handleArrival = (row) => {
         productHeight: x.productHeight,
         purchaseDetailId: x.id,
         purchaseQuantity: x.quantity,
+        maxQuantity: parseFloat(x.quantity * 1.05).toFixed(0),
         arrivalQuantity: x.arrivalQuantity,
         quantity: null,
       })),
+      arrivalDetailListOne: res.arrivalDetailList,
     };
     if (
       formData.data.arrivalDetailList &&
@@ -583,6 +622,24 @@ const handleArrival = (row) => {
         filePathAtt: "fileUrl",
       });
     }
+    if (
+      formData.data.arrivalDetailListOne &&
+      formData.data.arrivalDetailListOne.length > 0
+    ) {
+      let productIds = formData.data.arrivalDetailListOne.map(
+        (x) => x.productId
+      );
+      setTimeout(() => {
+        proxy.getFileData({
+          businessIdList: productIds,
+          data: formData.data.arrivalDetailListOne,
+          att: "productId",
+          businessType: "0",
+          fileAtt: "fileList",
+          filePathAtt: "fileUrl",
+        });
+      }, 500);
+    }
   });
   arrivalDialog.value = true;
 };

+ 23 - 0
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -291,6 +291,9 @@ const rules = ref({
   technologyId: [
     { required: true, message: "请选择生产工艺", trigger: "change" },
   ],
+  rawMaterialId: [
+    { required: true, message: "请选择原材料", trigger: "change" },
+  ],
 });
 const props = defineProps({
   selectStatus: Boolean,
@@ -567,6 +570,25 @@ const formConfig = computed(() => {
       title: "属性信息",
     },
     {
+      type: "select",
+      prop: "rawMaterialId",
+      label: "原材料",
+      itemWidth: 50,
+      data: rawMaterialData.value,
+      filterable: true,
+      disabled: false,
+      fn: (val) => {
+        let current = rawMaterialData.value.find((x) => x.value == val);
+        if (current) {
+          formData.data.price = Number(
+            parseFloat(
+              current["length"] * current.width * current.price
+            ).toFixed(2)
+          );
+        }
+      },
+    },
+    {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
@@ -574,6 +596,7 @@ const formConfig = computed(() => {
       itemWidth: 50,
       disabledSelect: true,
       data: currencyData.value,
+      disabled: true,
     },
     {
       type: "select",

+ 3 - 3
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -85,7 +85,7 @@
                         </div>
                       </template>
                     </el-table-column>
-                    <el-table-column prop="quantity" label="数量" width="110" />
+                    <!-- <el-table-column prop="quantity" label="数量" width="110" /> -->
                     <!-- <template #default="{ row, $index }">
                         <div style="width: 100%">
                           <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.quantity'"
@@ -95,7 +95,7 @@
                           </el-form-item>
                         </div>
                       </template> -->
-                    <el-table-column prop="allQuantity" label="总量" width="80" />
+                    <!-- <el-table-column prop="allQuantity" label="总量" width="80" />
                     <el-table-column prop="price" label="单价" width="110">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
@@ -109,7 +109,7 @@
                           ¥ {{row.amount}}
                         </div>
                       </template>
-                    </el-table-column>
+                    </el-table-column> -->
                     <el-table-column prop="remark" label="备注" width="180" />
                     <!-- <template #default="{ row, $index }">
                         <div style="width: 100%">

+ 230 - 7
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -73,7 +73,11 @@
                            @click="handleForeign(item)">转对外</el-button>
                 <el-button type="danger" text v-debounce v-if="item.status !=0 && item.status !=88"
                            @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
+                <el-button type="primary" text v-debounce @click="getConfirmDtl(item, false)">价格确认</el-button>
               </span>
+              <!-- <span v-if="item.status !=88">
+               v-if="item.confirmStatus==0"
+              </span> -->
             </div>
           </div>
         </template>
@@ -168,7 +172,7 @@
                           </div>
                         </template>
                       </el-table-column>
-                      <el-table-column label="数量" width="110">
+                      <!-- <el-table-column label="数量" width="110">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
                             <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.quantity'"
@@ -196,7 +200,7 @@
                             <span v-else>一</span>
                           </div>
                         </template>
-                      </el-table-column>
+                      </el-table-column> -->
                       <el-table-column label="备注" width="180">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
@@ -310,7 +314,7 @@
                           </div>
                         </template>
                       </el-table-column>
-                      <el-table-column label="数量" width="80" prop="quantity">
+                      <!-- <el-table-column label="数量" width="80" prop="quantity">
                       </el-table-column>
                       <el-table-column label="总数量" width="80" prop="allQuantity">
                       </el-table-column>
@@ -345,7 +349,7 @@
                             ¥ {{row.amount}}
                           </div>
                         </template>
-                      </el-table-column>
+                      </el-table-column> -->
                       <el-table-column label="备注" width="180" prop="remark">
                       </el-table-column>
                     </el-table>
@@ -397,6 +401,90 @@
       </template>
     </el-dialog>
 
+    <el-dialog v-if="confirmDialog" v-model="confirmDialog" title="价格确认" width="90%" append-to-body>
+      <byForm :formConfig="formConfigTwo" :formOption="formOptionTwo" v-model="formData.dataTwo" :rules="rulesTwo" ref="formDomTwo"
+              v-loading="submitLoading">
+        <template #commodity>
+          <div style="width: 100%;padding-left:25px">
+            <el-table :data="formData.dataTwo.quotationProductList" style="width: 100%;" default-expand-all>
+              <el-table-column type="expand" width="50" align="center">
+                <template #default="scope">
+                  <div style="padding-left:50px">
+                    <div style="margin-bottom:10px;">
+                      <TitleInfo content='BOM单:'></TitleInfo>
+                    </div>
+                    <el-table :data="scope.row.quotationProductBomList" style="width: 100%;" border class="bom-table">
+                      <el-table-column label="图片" width="80">
+                        <template #default="{ row }">
+                          <div v-if="row.fileUrl">
+                            <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                          </div>
+                          <div v-else></div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="productCode" label="物料编码" width="190" />
+                      <el-table-column prop="productName" label="物料名称" min-width="200" />
+                      <el-table-column label="尺寸 (cm)" width="150">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="备注" width="180" prop="remark">
+                      </el-table-column>
+                    </el-table>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                  </div>
+                  <div v-else></div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="190" />
+              <el-table-column prop="productName" label="商品名称" min-width="200" />
+              <el-table-column label="尺寸 (cm)" width="150">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productColor" label="颜色" width="100" />
+              <el-table-column label="数量" width="110" prop="quantity">
+              </el-table-column>
+              <el-table-column label="单价" width="110" prop="price">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rulesTwo.price" :inline-message="true"
+                                  class="margin-b-0 wid100">
+                      <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                       :controls="false" :min="0" @change="changeQuantityOne" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="amount" label="小计" width="110">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    ¥ {{row.amount}}
+                  </div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="confirmDialog = false" size="default" v-debounce>关 闭</el-button>
+        <el-button type="primary" size="default" v-debounce @click="confirmSubmit()">提 交</el-button>
+      </template>
+    </el-dialog>
+
     <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
       <SelectProduct @selectProduct="selectProduct" :companyId="companyId" :isRawMaterial="'1'" :disablePerm="'1'"></SelectProduct>
       <template #footer>
@@ -881,6 +969,7 @@ const formData = reactive({
     quotationProductList: [],
   },
   backData: {},
+  dataTwo: {},
 });
 const formDom = ref(null);
 const formOption = reactive({
@@ -1083,9 +1172,9 @@ const selectProduct = (goods) => {
           materialId: x.materialId,
           productName: x.materialName,
           productCode: x.materialCode,
-          productLength: x["length"],
-          productWidth: x.width,
-          productHeight: x.height,
+          productLength: x["materialLength"],
+          productWidth: x.materialWidth,
+          productHeight: x.materialHeight,
           quantity: x.quantity || null,
           allQuantity: "",
           price: null,
@@ -1617,6 +1706,140 @@ const handleSubmitBack = () => {
       });
   });
 };
+
+const getFileDataOne = () => {
+  let ids = [];
+  formData.dataTwo.quotationProductList.map((x) => {
+    // ids.push(x.productId);
+    x.quotationProductBomList.map((y) => {
+      ids.push(y.materialId);
+    });
+  });
+  ids = Array.from(new Set(ids));
+  proxy
+    .post("/fileInfo/getList", {
+      businessIdList: ids,
+    })
+    .then((fileObj) => {
+      formData.dataTwo.quotationProductList.map((x) => {
+        // x.fileList = fileObj[x.productId] || [];
+        // if (x.fileList && x.fileList.length > 0) {
+        //   x.fileUrl = x.fileList[0].fileUrl;
+        // }
+        x.quotationProductBomList.map((y) => {
+          y.fileList = fileObj[y.materialId] || [];
+          if (y.fileList && y.fileList.length > 0) {
+            y.fileUrl = y.fileList[0].fileUrl;
+          }
+        });
+      });
+    });
+};
+
+const changeQuantityOne = () => {
+  let money = 0;
+  if (
+    formData.dataTwo.quotationProductList &&
+    formData.dataTwo.quotationProductList.length > 0
+  ) {
+    // 单个产品的价格
+    for (let i = 0; i < formData.dataTwo.quotationProductList.length; i++) {
+      let iele = formData.dataTwo.quotationProductList[i];
+      iele.amount = Number(
+        parseFloat(Number(iele.quantity) * Number(iele.price)).toFixed(2)
+      );
+      money += iele.amount;
+    }
+    formData.dataTwo.amount = parseFloat(money).toFixed(2);
+  }
+};
+
+const getConfirmDtl = (row, flag) => {
+  formConfigTwo.disabled = flag;
+  modalType.value = "edit";
+  confirmDialog.value = true;
+  proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
+    formData.dataTwo = res;
+    formData.dataTwo.quotationProductList =
+      formData.dataTwo.quotationProductList.map((x) => ({
+        ...x,
+        price: x.prodPrice,
+      }));
+    // 文件数据回显
+    getFileDataOne();
+    let productIds = formData.dataTwo.quotationProductList.map(
+      (x) => x.productId
+    );
+    proxy.getFileData({
+      businessIdList: productIds,
+      data: formData.dataTwo.quotationProductList,
+      att: "productId",
+      businessType: "0",
+      fileAtt: "productFile",
+      filePathAtt: "fileUrl",
+    });
+    // 价格计算
+    changeQuantityOne();
+  });
+};
+
+const formDomTwo = ref(null);
+const confirmDialog = ref(false);
+const formConfigTwo = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "商品信息",
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+    {
+      type: "title1",
+      title: "报价总金额",
+    },
+    {
+      type: "input",
+      prop: "amount",
+      label: "报价总金额",
+      itemWidth: 25,
+      disabled: true,
+    },
+  ];
+});
+
+const formOptionTwo = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const rulesTwo = ref({
+  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
+  // coefficient: [{ required: true, message: "请输入系数", trigger: "blur" }],
+});
+
+const confirmSubmit = () => {
+  formDomTwo.value.handleSubmit(() => {
+    proxy
+      .msgConfirm()
+      .then((res) => {
+        submitLoading.value = true;
+        proxy.post("/saleQuotation/edit", formData.dataTwo).then((res) => {
+          proxy.msgTip("操作成功", 1);
+          submitLoading.value = false;
+          confirmDialog.value = false;
+          getList();
+          detailDialog.value = false;
+        });
+      })
+      .catch((err) => {
+        submitLoading.value = false;
+      });
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 46 - 56
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -59,7 +59,7 @@
         <div class="left">
           <el-card style="width:100%;margin-bottom:15px" v-for="(item,index) in quotationProductList" :key="index">
             <div style="text-align:right">
-              <el-button plain type="primary" @click="handleReportPrice(item)">报价</el-button>
+              <el-button plain type="primary" @click="handleReportPrice(item,index)">报价</el-button>
             </div>
             <el-table :data="[item]" style="width: 100%;">
               <el-table-column type="expand" width="50" align="center">
@@ -133,12 +133,12 @@
               <el-table-column prop="productColor" label="颜色" width="100" />
               <el-table-column label="数量" width="120" prop="quantity">
               </el-table-column>
-              <el-table-column label="单价" width="120" prop="price" fixed="right">
+              <el-table-column label="单价" width="120" prop="prodPrice" fixed="right">
                 <template #default="{ row, $index }">
                   <div style="width: 100%;">
                     <span :style="{
-                      color:row.price?'red':''
-                    }">¥{{row.price}}</span>
+                      color:row.prodPrice?'red':''
+                    }">¥{{row.prodPrice}}</span>
                   </div>
                 </template>
               </el-table-column>
@@ -146,7 +146,7 @@
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     <span :style="{
-                      color:row.price?'red':''
+                      color:row.prodPrice?'red':''
                     }">¥{{row.amount}}</span>
                   </div>
                 </template>
@@ -408,11 +408,14 @@
           <div style="text-align:center" class="btn" v-if="!isDetail && formData.data.quotationProductId">
             <el-button @click="openAddDialog = false" size="default" v-debounce>关 闭</el-button>
             <!-- <el-button type="primary" @click="handleSubmit(1)" size="default" v-debounce>暂 存</el-button> -->
-            <el-button type="primary" @click="handleSubmit(2)" size="default" v-debounce>提 交</el-button>
+            <el-button type="primary" @click="handleSubmit(2)" size="default" v-debounce>保 存</el-button>
           </div>
 
         </div>
       </div>
+      <div style="text-align:center">
+        <el-button type="primary" @click="handleSubmitOne()" size="default" v-debounce>提交</el-button>
+      </div>
 
       <!-- <template #footer v-if="!isDetail">
         <el-button @click="openAddDialog = false" size="default" v-debounce>关 闭</el-button>
@@ -580,7 +583,7 @@ const config = computed(() => {
                 },
                 el: "button",
                 click() {
-                  getDtlOne(row);
+                  getDtlOne(row, false, 0);
                 },
               }
             : {},
@@ -863,7 +866,7 @@ const getFileDataOne = () => {
 };
 const quotationProductList = ref([]);
 const allData = ref({});
-const getDtlOne = (row, flag = false) => {
+const getDtlOne = (row, flag = false, index = 0) => {
   formOption.disabled = flag;
   isDetail.value = flag;
   openAddDialog.value = true;
@@ -872,29 +875,13 @@ const getDtlOne = (row, flag = false) => {
     formData.data = {
       quotationProductId: "",
     };
-    // // 是否显示退回原因
-    // if (res.backRemark) {
-    //   isShowBackRemark.value = true;
-    // } else {
-    //   isShowBackRemark.value = false;
-    // }
-    // 城市数据回显
-    // if (formData.data.buyCountryId) {
-    //   getCityData(formData.data.buyCountryId, "20");
-    // }
-    // if (formData.data.buyProvinceId) {
-    //   getCityData(formData.data.buyProvinceId, "30");
-    // }
-    // 价格计算
     quotationProductList.value = res.quotationProductList.map((x) => ({
       ...x,
-      amount: parseFloat(x.quantity * x.price).toFixed(2),
+      amount: parseFloat(x.quantity * x.prodPrice).toFixed(2),
     }));
     if (quotationProductList.value && quotationProductList.value.length > 0) {
-      handleReportPrice(quotationProductList.value[0]);
+      handleReportPrice(quotationProductList.value[index], index);
     }
-    // changeQuantity();
-    // 文件数据回显
     getFileDataOne();
     let productIds = quotationProductList.value.map((x) => x.productId);
     proxy.getFileData({
@@ -905,34 +892,6 @@ const getDtlOne = (row, flag = false) => {
       fileAtt: "productFile",
       filePathAtt: "fileUrl",
     });
-    //折线图
-    // if (res.quotationTrendList && res.quotationTrendList.length >= 2) {
-    //   isShowChart.value = true;
-    //   nextTick(() => {
-    //     myChart = echarts.init(chartDom.value);
-    //     window.addEventListener("resize", () => {
-    //       myChart.resize();
-    //     });
-    //     chartData.value = res.quotationTrendList;
-    //     chartOption.data.xAxis.data = chartData.value.map((item) => {
-    //       return item.createTime.slice(0, 10);
-    //     });
-    //     chartOption.data.series[0].data = chartData.value.map((item, index) => {
-    //       if (item.code == row.code) {
-    //         return {
-    //           value: item.amount || 0,
-    //           itemStyle: { color: "red" },
-    //         };
-    //       } else {
-    //         return item.amount || 0;
-    //       }
-    //     });
-    //     myChart.setOption(chartOption.data);
-    //     myChart.resize();
-    //   });
-    // } else {
-    //   isShowChart.value = false;
-    // }
   });
 };
 
@@ -1032,7 +991,7 @@ const handleSubmit = (type) => {
           // openAddDialog.value = false;
           submitLoading.value = false;
           // getList();
-          getDtlOne(allData.value, false);
+          getDtlOne(allData.value, false, currentIndex.value);
         },
         (err) => {
           submitLoading.value = false;
@@ -1044,6 +1003,34 @@ const handleSubmit = (type) => {
   });
 };
 
+const handleSubmitOne = () => {
+  let listLength = 0;
+  for (let i = 0; i < quotationProductList.value.length; i++) {
+    const ele = quotationProductList.value[i];
+    if (ele.prodPrice && Number(ele.prodPrice) > 0) {
+      listLength += 1;
+    }
+  }
+  if (listLength == quotationProductList.value.length) {
+    proxy
+      .msgConfirm()
+      .then((res) => {
+        proxy
+          .post("/quotationEstimate/submitQuotation", {
+            quotationId: allData.value.id,
+          })
+          .then((res) => {
+            proxy.msgTip("操作成功", 1);
+            openAddDialog.value = false;
+            getList();
+          });
+      })
+      .catch((err) => {});
+  } else {
+    return proxy.msgTip("还有未报价的商品", 2);
+  }
+};
+
 const moldData = ref([]);
 const getDict = () => {
   proxy
@@ -1057,7 +1044,10 @@ const getDict = () => {
 };
 getDict();
 
-const handleReportPrice = (item) => {
+let currentIndex = ref(-1);
+const handleReportPrice = (item, index) => {
+  console.log(item, index);
+  currentIndex.value = index;
   submitLoading.value = true;
   formData.data = {
     quotationProductId: item.id,

+ 53 - 1
src/views/MES/processScheduling/index.vue

@@ -129,8 +129,35 @@
         </div>
       </div>
     </div>
-    <el-dialog :title="'排程'" v-model="dialogVisible" width="500" destroy-on-close>
+    <el-dialog :title="'排程'" v-model="dialogVisible" width="50%" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #addList>
+          <div style="width:100%">
+            <el-button type="primary" @click="clickAdd()" plain style="margin-bottom: 16px">添加</el-button>
+            <el-table :data="formData.data.list" border>
+              <el-table-column label="排程日期">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'list.' + $index + '.schedulingDate'" :rules="rules.schedulingDate" :inline-message="true" class="margin-b-0">
+                    <el-date-picker v-model="row.schedulingDate" type="date" placeholder="请选择" :value-format="'YYYY-MM-DD'" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="数量" width="150">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="1" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="60" align="center" fixed="right">
+                <template #default="{ row,$index }">
+                  <el-button type="primary" link @click="clickDetele($index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
@@ -477,6 +504,7 @@ const formConfig = computed(() => {
       label: "排程日期",
       itemWidth: 100,
       disabled: false,
+      isShow: modalType.value == "edit",
     },
     {
       type: "number",
@@ -486,6 +514,13 @@ const formConfig = computed(() => {
       min: 0,
       controls: false,
       itemWidth: 100,
+      isShow: modalType.value == "edit",
+    },
+    {
+      type: "slot",
+      slotName: "addList",
+      label: "排程列表",
+      isShow: modalType.value == "add",
     },
   ];
 });
@@ -571,7 +606,11 @@ const getList = async (req) => {
 };
 
 const isShowDeteleBtn = ref(false);
+const rowData = ref({});
+const processesRowData = ref({});
 const openModal = (item, sonItem, type, record = {}) => {
+  rowData.value = item;
+  processesRowData.value = sonItem;
   let schedulingCount = 0;
   let current = item.productionTaskProgressList.find(
     (x) => x.processesId == sonItem.id
@@ -589,6 +628,7 @@ const openModal = (item, sonItem, type, record = {}) => {
     processesName: sonItem.name,
     schedulingDate: record.schedulingDate || "",
     quantity: record.quantity || null,
+    list: [],
   };
   if (type == "edit" && record && record.id) {
     formData.data.id = record.id;
@@ -597,6 +637,17 @@ const openModal = (item, sonItem, type, record = {}) => {
   dialogVisible.value = true;
 };
 
+const clickAdd = () => {
+  formData.data.list.push({
+    taskId: rowData.value.id,
+    processesId: processesRowData.value.id,
+    schedulingDate: "",
+    quantity: null,
+  });
+};
+const clickDetele = (index) => {
+  formData.data.list.splice(index, 1);
+};
 const deleteRecord = () => {
   proxy
     .msgConfirm()
@@ -1022,6 +1073,7 @@ const isShowDayData = (day, process) => {
 ::v-deep(.el-table-fixed-column--right) {
   vertical-align: top !important;
   padding: 0px !important;
+  border: 1px solid #ebeef5 !important;
   .cell {
     padding: 0px !important;
   }

+ 35 - 41
src/views/MES/productionOrder/index.vue

@@ -66,15 +66,10 @@
 
       </byTable>
     </div>
-    <div class="schedule-right">
+    <!-- <div class="schedule-right">
       <div class="schedule-top">
         <el-row>
-          <!-- <el-col :span="10" style="text-align: left">
-            <el-select v-model="status" style="width: 110px">
-              <el-option v-for="item in tableStatus" :key="item.value" :label="item.label" :value="item.value" />
-            </el-select>
-            <el-button type="info" style="margin-left: 8px" @click="clickToday()" plain>今日</el-button>
-          </el-col> -->
+        
           <el-col :span="24" style="text-align: center; height: 32px; line-height: 32px">
             <div style="display: flex; justify-content: space-between">
               <el-button @click="clickToday()" plain>今日</el-button>
@@ -83,9 +78,7 @@
               <el-button :icon="ArrowRightBold" @click="nextMonth()" />
             </div>
           </el-col>
-          <!-- <el-col :span="10" style="text-align: right">
-            <el-button type="primary" @click="newSchedule()">新建日程</el-button>
-          </el-col> -->
+       
         </el-row>
       </div>
       <div class="schedule-bottom">
@@ -122,7 +115,7 @@
           </template>
         </el-calendar>
       </div>
-    </div>
+    </div> -->
     <el-dialog :title="modalType == 'add' ? '添加店铺' : '编辑店铺'" v-model="dialogVisible" width="500px" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
       </byForm>
@@ -726,7 +719,7 @@ const getRightData = () => {
       }
     );
 };
-getRightData();
+// getRightData();
 
 const getBackGround = (id) => {
   return { background: colorData.value[id] };
@@ -1036,37 +1029,38 @@ const submitConfirm = (type) => {
   padding: 10px;
   display: flex;
   justify-content: space-between;
-  .schedule-right {
-    width: 400px;
-    .schedule-top {
-      width: 100%;
-      background: #fff;
-      padding: 20px;
-    }
-    .schedule-bottom {
-      width: 100%;
-      background: #fff;
-      height: calc(100vh - 100px - 20px - 83px);
-      padding: 20px;
-      margin-top: 10px;
-      overflow-y: auto;
-      &::-webkit-scrollbar {
-        width: 0px;
-      }
+  // .schedule-right {
+  //   width: 400px;
+  //   .schedule-top {
+  //     width: 100%;
+  //     background: #fff;
+  //     padding: 20px;
+  //   }
+  //   .schedule-bottom {
+  //     width: 100%;
+  //     background: #fff;
+  //     height: calc(100vh - 100px - 20px - 83px);
+  //     padding: 20px;
+  //     margin-top: 10px;
+  //     overflow-y: auto;
+  //     &::-webkit-scrollbar {
+  //       width: 0px;
+  //     }
 
-      .line-class {
-        height: 18px;
-        line-height: 18px;
-        overflow: hidden;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-        -o-text-overflow: ellipsis;
-        margin: 1px 0;
-      }
-    }
-  }
+  //     .line-class {
+  //       height: 18px;
+  //       line-height: 18px;
+  //       overflow: hidden;
+  //       white-space: nowrap;
+  //       text-overflow: ellipsis;
+  //       -o-text-overflow: ellipsis;
+  //       margin: 1px 0;
+  //     }
+  //   }
+  // }
   .content {
-    width: calc(100% - 410px);
+    // width: calc(100% - 410px);
+    width: 100%;
   }
 }
 ::v-deep(.el-calendar__header) {

+ 9 - 8
src/views/MES/productionTask/index.vue

@@ -424,6 +424,14 @@ const selectConfig = computed(() => [
 ]);
 const config = ref([
   {
+    attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 80,
+      fixed: "left",
+    },
+  },
+  {
     type: "selection",
     attrs: {
       checkAtt: "isCheck",
@@ -571,13 +579,6 @@ const config = ref([
   },
   {
     attrs: {
-      label: "是否逾期",
-      slot: "isOverdue",
-      width: 80,
-    },
-  },
-  {
-    attrs: {
       label: "生产指示",
       slot: "prodTag",
       "min-width": 220,
@@ -811,7 +812,7 @@ const getProcesses = () => {
           label: `[ ${ele.name} ]`,
           slot: ele.id,
           isNeedHeaderSlot: false,
-          width: 90,
+          width: 70,
           align: "center",
           fixed: "right",
         };

+ 29 - 10
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -85,6 +85,7 @@ import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryI
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const warehouseListOne = ref([]);
 const outBoundReason = ref([
   {
     label: "生产打样",
@@ -377,11 +378,38 @@ const formConfig = computed(() => {
       title: "基本信息",
     },
     {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {
+        proxy
+          .post("/warehouse/page", {
+            pageNum: 1,
+            pageSize: 999,
+            companyId: val,
+          })
+          .then((res) => {
+            if (res.rows && res.rows.length > 0) {
+              warehouseListOne.value = res.rows.map((item) => {
+                return {
+                  label: item.name,
+                  value: item.id,
+                };
+              });
+            }
+          });
+      },
+    },
+    {
       type: "select",
       prop: "warehouseId",
       label: "仓库名称",
       required: true,
-      data: warehouseList.value,
+      data: warehouseListOne.value,
       fn: () => {
         changeWarehouse();
       },
@@ -434,15 +462,6 @@ const formConfig = computed(() => {
       isShow: formData.data.type == "3",
     },
     {
-      type: "treeSelect",
-      prop: "companyId",
-      label: "业务公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
-      itemWidth: 50,
-    },
-    {
       type: "input",
       itemType: "textarea",
       prop: "remarks",

+ 29 - 10
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -84,6 +84,7 @@ import SelectAllGood from "@/components/product/SelectAllGood";
 // import SelectMaterial from "@/components/product/SelectMaterial.vue";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const warehouseListOne = ref([]);
 const materialUnitData = computed(
   () => proxy.useUserStore().allDict["material_unit"]
 );
@@ -382,11 +383,38 @@ const formConfig = computed(() => {
       title: "基本信息",
     },
     {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {
+        proxy
+          .post("/warehouse/page", {
+            pageNum: 1,
+            pageSize: 999,
+            companyId: val,
+          })
+          .then((res) => {
+            if (res.rows && res.rows.length > 0) {
+              warehouseListOne.value = res.rows.map((item) => {
+                return {
+                  label: item.name,
+                  value: item.id,
+                };
+              });
+            }
+          });
+      },
+    },
+    {
       type: "select",
       prop: "warehouseId",
       label: "仓库名称",
       required: true,
-      data: warehouseList.value,
+      data: warehouseListOne.value,
       itemWidth: 50,
     },
     {
@@ -498,15 +526,6 @@ const formConfig = computed(() => {
       },
     },
     {
-      type: "treeSelect",
-      prop: "companyId",
-      label: "业务公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
-      itemWidth: 50,
-    },
-    {
       type: "input",
       itemType: "textarea",
       prop: "remarks",