Преглед изворни кода

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

cz пре 1 година
родитељ
комит
4da21c6adf

+ 1 - 1
src/components/process/Contract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/EHSD/Contract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/EHSD/PriceSheet.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 266 - 135
src/components/process/EHSD/Purchase.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => changeSellAddress(val, '20')">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => changeSellAddress(val, '20')">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>
@@ -166,7 +166,7 @@
             :style="index !== formData.data.purchaseProductList.length - 1 ? 'margin-bottom: 20px' : ''"
             v-for="(item, index) in formData.data.purchaseProductList"
             :key="item.dataResourceId">
-            <div style="border: 1px solid #ccc; padding: 20px 10px; width: 100%">
+            <div style="border: 1px solid #ccc; padding: 20px 10px 0 10px; width: 100%">
               <el-row style="width: 100%" :gutter="5" type="flex" align="middle">
                 <el-col :span="2" style="text-align: center">
                   <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="onPicture(item.fileUrl)" />
@@ -187,93 +187,86 @@
                   <el-button type="primary" text @click="handleHandover(item, index)">编辑备注</el-button>
                 </el-col>
                 <el-col :span="2">
-                  <el-button type="primary" text @click="handleHandover(item, index)">添加配件</el-button>
+                  <el-button type="primary" text @click="handleMaterial(index)">添加配件</el-button>
                 </el-col>
                 <el-col :span="3">
                   <span>金额小计: {{ item.amount }}</span>
                 </el-col>
               </el-row>
-              <!-- <div style="width: 80px">
-                <div v-if="item.fileUrl">
-                </div>
+              <el-collapse v-model="item.activeName" class="hideCollapse" accordion>
+                <el-collapse-item title="" :name="true">
+                  <div style="padding: 0 40px">
+                    <el-table :data="item.purchaseProductMountingsList" style="width: 100%">
+                      <el-table-column label="图片" align="center" width="80">
+                        <template #default="{ row }">
+                          <img v-if="row.fileUrl" :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="类型" align="center" width="80">
+                        <template #default="{ row }">
+                          <div>{{ dictValueLabel(row.productType, productType) }}</div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="产品名称" prop="productName" min-width="180" />
+                      <el-table-column label="尺寸" prop="productModel" min-width="140" />
+                      <el-table-column label="单价" width="140">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%" class="removePadding">
+                            <el-form-item
+                              :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.price'"
+                              :rules="rules.price"
+                              :inline-message="true"
+                              @change="
+                                () => {
+                                  return changeProductMaterial(index, $index);
+                                }
+                              ">
+                              <el-input-number v-model="row.price" placeholder="请输入单价" :precision="2" :controls="false" :min="0" />
+                            </el-form-item>
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="数量" width="140">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%" class="removePadding">
+                            <el-form-item
+                              :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.quantity'"
+                              :rules="rules.quantity"
+                              :inline-message="true"
+                              @change="
+                                () => {
+                                  return changeProductMaterial(index, $index);
+                                }
+                              ">
+                              <el-input-number v-model="row.quantity" placeholder="请输入数量" :precision="0" :controls="false" :min="0" />
+                            </el-form-item>
+                          </div>
+                        </template>
+                      </el-table-column>
+                      <el-table-column label="金额" prop="amount" width="100" />
+                      <el-table-column label="操作" align="center" width="80" fixed="right">
+                        <template #default="{ $index }">
+                          <el-button type="primary" v-if="$index !== 0" link @click="handleRemove(index, $index)">删除</el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+                  </div>
+                </el-collapse-item>
+              </el-collapse>
+              <div style="text-align: center; margin-top: -18px">
+                <el-button type="primary" @click="item.activeName = !item.activeName" style="margin-bottom: -28px" text>
+                  <span v-if="item.activeName">
+                    <span style="vertical-align: middle">收起明细</span>
+                    <el-icon style="margin-left: 8px; transform: rotate(-90deg); vertical-align: middle"><DArrowRight /></el-icon>
+                  </span>
+                  <span v-else>
+                    <span style="vertical-align: middle">查看明细</span>
+                    <el-icon style="margin-left: 8px; transform: rotate(90deg); vertical-align: middle"><DArrowRight /></el-icon>
+                  </span>
+                </el-button>
               </div>
-              <div ></div> -->
             </div>
           </div>
-          <!--<el-table :data="formData.data.purchaseProductList" style="width: 100%; margin-top: 16px">
-            <el-table-column label="商品图片" width="80">
-              <template #default="{ row }">
-                <div v-if="row.productId">
-                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                </div>
-                <div v-else></div>
-              </template>
-            </el-table-column>
-            <el-table-column label="商品名称" min-width="180">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <!~~ <el-form-item
-                    :prop="'purchaseProductList.' + $index + '.productName'"
-                    :rules="rules.productName"
-                    :inline-message="true"
-                    class="shrinkPadding">
-                    <el-input v-model="row.productName" placeholder="请输入商品名称" />
-                  </el-form-item> ~~>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="尺寸 cm*cm*cm" width="140">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <!~~ <el-form-item
-                    :prop="'purchaseProductList.' + $index + '.productModel'"
-                    :rules="rules.productModel"
-                    :inline-message="true"
-                    class="shrinkPadding">
-                    <el-input v-model="row.productModel" placeholder="请输入" />
-                  </el-form-item> ~~>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="数量" width="130">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      v-model="row.quantity"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column label="单价" width="140">
-              <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      v-model="row.price"
-                      placeholder="请输入"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
-                  </el-form-item>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="amount" label="金额" width="130" />
-            <el-table-column label="操作" width="60" align="center" fixed="right">
-              <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleRemove($index, row)">删除</el-button>
-              </template>
-            </el-table-column>
-          </el-table>-->
         </div>
       </template>
       <template #otherCharge>
@@ -301,15 +294,13 @@
             <el-table-column label="金额" width="130">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'purchaseProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true" class="shrinkPadding">
-                    <el-input-number
-                      v-model="row.amount"
-                      placeholder="请输入金额"
-                      style="width: 100%"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="totalAmount()" />
+                  <el-form-item
+                    :prop="'purchaseProjectList.' + $index + '.amount'"
+                    :rules="rules.amount"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                    @change="changeProject">
+                    <el-input-number v-model="row.amount" placeholder="请输入金额" style="width: 100%" :precision="2" :controls="false" :min="0" />
                   </el-form-item>
                 </div>
               </template>
@@ -355,27 +346,20 @@
           <el-table :data="formData.data.purchaseArrivalList" style="width: 100%; margin-top: 16px">
             <el-table-column prop="code" label="商品编码" width="120" />
             <el-table-column prop="productName" label="商品名称" />
-            <el-table-column label="货日期" width="220">
+            <el-table-column label="货日期" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseArrivalList.' + $index + '.arrivalTime'" :rules="rules.arrivalTime" :inline-message="true">
-                    <el-date-picker v-model="row.arrivalTime" type="date" placeholder="请选择货日期" value-format="YYYY-MM-DD" />
+                    <el-date-picker v-model="row.arrivalTime" type="date" placeholder="请选择货日期" value-format="YYYY-MM-DD" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="数量" width="160">
+            <el-table-column label="到货数量" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseArrivalList.' + $index + '.quantity'" :inline-message="true">
-                    <el-input-number
-                      v-model="row.quantity"
-                      placeholder="请输入数量"
-                      style="width: 100%"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="calculationAmount()" />
+                    <el-input-number v-model="row.quantity" placeholder="请输入到货数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
                   </el-form-item>
                 </div>
               </template>
@@ -391,8 +375,8 @@
       </template>
     </byForm>
 
-    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="公司产品库" width="90%" append-to-body>
-      <CompanyProduct :selectStatus="true"></CompanyProduct>
+    <el-dialog v-if="openMaterialCompany" v-model="openMaterialCompany" title="公司产品库" width="90%" append-to-body>
+      <ProductMaterial :selectStatus="true" @selectMaterial="selectMaterial"></ProductMaterial>
     </el-dialog>
 
     <el-dialog title="备注" v-if="openHandover" v-model="openHandover" width="800">
@@ -427,7 +411,7 @@
 
 <script setup>
 import byForm from "@/components/byForm/index";
-import CompanyProduct from "@/views/EHSD/productLibrary/companyProduct/index";
+import ProductMaterial from "@/views/product/material/index";
 import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
 import Editor from "@/components/Editor/index.vue";
@@ -441,7 +425,7 @@ const supplierList = ref([]);
 const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
-const openProductCompany = ref(false);
+const openMaterialCompany = ref(false);
 const formData = reactive({
   data: {
     deliveryType: 1,
@@ -467,6 +451,16 @@ const deliveryType = ref([
     value: 3,
   },
 ]);
+const productType = ref([
+  {
+    label: "产品",
+    value: 1,
+  },
+  {
+    label: "物料",
+    value: 2,
+  },
+]);
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
@@ -622,8 +616,23 @@ const changeBuyCorporation = (val) => {
 };
 const changeAddress = () => {
   if (formData.data.deliveryType === 1) {
-    formData.data.address =
-      formData.data.buyCountryName + ", " + formData.data.buyProvinceName + ", " + formData.data.buyCityName + "," + formData.data.buyAddress;
+    let buyCountryName = "";
+    if (formData.data.buyCountryName) {
+      buyCountryName = formData.data.buyCountryName;
+    }
+    let buyProvinceName = "";
+    if (formData.data.buyProvinceName) {
+      buyProvinceName = formData.data.buyProvinceName;
+    }
+    let buyCityName = "";
+    if (formData.data.buyCityName) {
+      buyCityName = formData.data.buyCityName;
+    }
+    let buyAddress = "";
+    if (formData.data.buyAddress) {
+      buyAddress = formData.data.buyAddress;
+    }
+    formData.data.address = buyCountryName + ", " + buyProvinceName + ", " + buyCityName + "," + buyAddress;
   } else if (formData.data.deliveryType === 2) {
     let countryName = "";
     if (formData.data.countryId) {
@@ -634,11 +643,19 @@ const changeAddress = () => {
     if (formData.data.provinceId) {
       let data = provinceData.value.filter((item) => item.id === formData.data.provinceId);
       if (data && data.length > 0) provinceName = data[0].name;
+    } else {
+      if (formData.data.provinceName) {
+        provinceName = formData.data.provinceName;
+      }
     }
     let cityName = "";
     if (formData.data.cityId) {
       let data = cityData.value.filter((item) => item.id === formData.data.cityId);
       if (data && data.length > 0) cityName = data[0].name;
+    } else {
+      if (formData.data.cityName) {
+        cityName = formData.data.cityName;
+      }
     }
     let sellAddress = "";
     if (formData.data.sellAddress) {
@@ -718,44 +735,88 @@ const changeSupplier = (val) => {
 const onPicture = (path) => {
   window.open(path, "_blank");
 };
-const handleRemove = async (index, row) => {
-  formData.data.purchaseArrivalList = formData.data.purchaseArrivalList.filter((item) => item.productId !== row.productId);
-  await formData.data.purchaseProductList.splice(index, 1);
-  totalAmount();
-};
-const calculationAmount = () => {
+const changeProject = () => {
   nextTick(() => {
-    if (formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0) {
-      for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-        let money = 0;
-        if (formData.data.purchaseProductList[i].quantity && formData.data.purchaseProductList[i].price) {
-          money = parseFloat(Number(formData.data.purchaseProductList[i].quantity) * Number(formData.data.purchaseProductList[i].price)).toFixed(2);
-        }
-        formData.data.purchaseProductList[i].amount = money;
-      }
-    }
-    nextTick(() => {
-      totalAmount();
-    });
+    calculationAllAmount();
   });
 };
-const totalAmount = () => {
-  let money = 0;
+const calculationAllAmount = () => {
+  let amount = 0;
   if (formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0) {
     for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
       if (formData.data.purchaseProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.purchaseProductList[i].amount)).toFixed(2);
+        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[i].amount)).toFixed(2));
       }
     }
   }
   if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
     for (let i = 0; i < formData.data.purchaseProjectList.length; i++) {
       if (formData.data.purchaseProjectList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.purchaseProjectList[i].amount)).toFixed(2);
+        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProjectList[i].amount)).toFixed(2));
+      }
+    }
+  }
+  formData.data.amount = amount;
+};
+const calculationProductAmount = (index) => {
+  if (
+    formData.data.purchaseProductList &&
+    formData.data.purchaseProductList.length > 0 &&
+    formData.data.purchaseProductList[index].purchaseProductMountingsList &&
+    formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
+  ) {
+    let amount = 0;
+    for (let i = 0; i < formData.data.purchaseProductList[index].purchaseProductMountingsList.length; i++) {
+      if (formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount) {
+        amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount)).toFixed(2));
       }
     }
+    formData.data.purchaseProductList[index].amount = amount;
+    let price = 0;
+    if (formData.data.purchaseProductList[index].quantity && amount) {
+      price = Number(parseFloat(Number(amount) / Number(formData.data.purchaseProductList[index].quantity)).toFixed(4));
+    }
+    formData.data.purchaseProductList[index].price = price;
   }
-  formData.data.amount = money;
+  nextTick(() => {
+    calculationAllAmount();
+  });
+};
+const changeProductMaterial = (index, indexTwo) => {
+  nextTick(() => {
+    if (
+      formData.data.purchaseProductList &&
+      formData.data.purchaseProductList.length > 0 &&
+      formData.data.purchaseProductList[index].purchaseProductMountingsList &&
+      formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
+    ) {
+      if (indexTwo === 0 && formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) {
+        formData.data.purchaseProductList[index].quantity = formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity;
+      }
+      if (
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity &&
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price
+      ) {
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = Number(
+          parseFloat(
+            Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) *
+              Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price)
+          ).toFixed(2)
+        );
+      } else {
+        formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = 0;
+      }
+    }
+    nextTick(() => {
+      calculationProductAmount(index);
+    });
+  });
+};
+const handleRemove = async (index, indexTwo) => {
+  await formData.data.purchaseProductList[index].purchaseProductMountingsList.splice(indexTwo, 1);
+  nextTick(() => {
+    calculationProductAmount(index);
+  });
 };
 const clickAdd = () => {
   if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
@@ -770,7 +831,9 @@ const clickAdd = () => {
 };
 const handleDelete = async (index) => {
   await formData.data.purchaseProjectList.splice(index, 1);
-  totalAmount();
+  nextTick(() => {
+    calculationAllAmount();
+  });
 };
 const querySearch = (queryString, callback) => {
   proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
@@ -799,7 +862,7 @@ const handleSubmit = async () => {
             quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
           }
           if (quantity > formData.data.purchaseProductList[i].quantity) {
-            ElMessage("出货数量不能大于商品数量");
+            ElMessage("到货数量不能大于采购数量");
             return false;
           }
         }
@@ -832,22 +895,47 @@ onMounted(() => {
             productId: item.productId,
             productName: item.productName,
             productModel: item.productModel,
-            quantity: "",
+            quantity: item.expendQuantity,
             price: "",
             amount: "",
             remark: "",
             json: "",
+            fileUrl: "",
             dataResource: props.queryData.type,
             dataResourceId: item.id,
-            purchaseProductMountingsList: [],
+            purchaseProductMountingsList: [
+              {
+                productId: item.productId,
+                productType: 1,
+                productName: item.productName,
+                productModel: item.productModel,
+                quantity: item.expendQuantity,
+                price: undefined,
+                amount: "",
+                remark: "",
+                json: "",
+                fileUrl: "",
+                activeName: false,
+              },
+            ],
             fileList: [],
           };
         });
+        formData.data.purchaseArrivalList = res.rows.map((item) => {
+          return {
+            code: item.productCode,
+            productId: item.productId,
+            productName: item.productName,
+            arrivalTime: "",
+            quantity: undefined,
+          };
+        });
         let fileIds = formData.data.purchaseProductList.map((item) => item.productId);
         proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
           for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
             if (resFile[formData.data.purchaseProductList[i].productId] && resFile[formData.data.purchaseProductList[i].productId].length > 0) {
               formData.data.purchaseProductList[i].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
+              formData.data.purchaseProductList[i].purchaseProductMountingsList[0].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
             }
           }
         });
@@ -942,6 +1030,10 @@ const handleHandover = (row, index) => {
   productIndex.value = index;
   openHandover.value = true;
 };
+const handleMaterial = (index) => {
+  productIndex.value = index;
+  openMaterialCompany.value = true;
+};
 const uploadFile = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
@@ -982,6 +1074,37 @@ const submitHandoverForm = () => {
   formData.data.purchaseProductList[productIndex.value].remark = productRow.data.remark;
   openHandover.value = false;
 };
+const selectMaterial = (goods) => {
+  if (goods && goods.id) {
+    let data = formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.filter((item) => item.productId === goods.id);
+    if (data && data.length > 0) {
+      return ElMessage("该物料已添加");
+    }
+    let fileUrl = "";
+    if (goods.fileList && goods.fileList.length > 0) {
+      fileUrl = goods.fileList[0].fileUrl;
+    }
+    formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.push({
+      productId: goods.id,
+      productType: 2,
+      productName: goods.name,
+      productModel: goods.spec,
+      quantity: undefined,
+      price: undefined,
+      amount: "",
+      remark: "",
+      json: "",
+      fileUrl: fileUrl,
+      activeName: false,
+    });
+    ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    return ElMessage("选择错误");
+  }
+};
 </script>
 
 <style lang="scss" scoped>
@@ -999,7 +1122,7 @@ const submitHandoverForm = () => {
   padding-right: 0 !important;
 }
 .hideCollapse {
-  margin-top: -62px;
+  margin-top: -28px;
   border: 0 !important;
 }
 ::v-deep(.el-collapse-item__arrow) {
@@ -1011,6 +1134,9 @@ const submitHandoverForm = () => {
 ::v-deep(.el-collapse-item__header) {
   border: 0 !important;
 }
+::v-deep(.el-collapse-item__content) {
+  padding-bottom: 8px !important;
+}
 .pic {
   object-fit: contain;
   width: 50px;
@@ -1018,4 +1144,9 @@ const submitHandoverForm = () => {
   cursor: pointer;
   vertical-align: middle;
 }
+::v-deep(.removePadding) {
+  .el-form-item {
+    padding-right: 0 !important;
+  }
+}
 </style>

+ 1 - 1
src/components/process/EHSD/Sample.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/PriceSheet.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/ServiceContract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 293 - 0
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="tenant">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      :selectConfig="selectConfig"
+      highlight-current-row
+      @get-list="getList">
+      <template #amount="{ item }">
+        <div>
+          <span style="padding-right: 4px">{{ item.currency }}</span>
+          <span>{{ moneyFormat(item.amount, 2) }}</span>
+        </div>
+      </template>
+    </byTable>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const supplierList = ref([]);
+const status = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "驳回",
+    value: 20,
+  },
+  {
+    label: "已采购",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+  {
+    label: "终止",
+    value: 99,
+  },
+]);
+const payStatus = ref([
+  {
+    label: "未付款",
+    value: 0,
+  },
+  {
+    label: "部分付款",
+    value: 10,
+  },
+  {
+    label: "已付款",
+    value: 20,
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    status: "",
+    payStatus: "",
+  },
+});
+const loading = ref(false);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "采购状态",
+      prop: "status",
+      data: status.value,
+    },
+    {
+      label: "付款状态",
+      prop: "payStatus",
+      data: payStatus.value,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "采购单号",
+        prop: "code",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "供应商",
+        prop: "sellCorporationId",
+        "min-width": 220,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, supplierList.value);
+      },
+    },
+    {
+      attrs: {
+        label: "采购金额",
+        slot: "amount",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "版本号",
+        prop: "version",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "采购人",
+        prop: "userName",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "采购时间",
+        prop: "createTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "采购状态",
+        prop: "status",
+        width: 140,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, status.value);
+      },
+    },
+    {
+      attrs: {
+        label: "付款状态",
+        prop: "payStatus",
+        width: 140,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, payStatus.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: 160,
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "打印",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+          row.status == 30
+            ? {
+                attrs: {
+                  label: "作废",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm("此操作将作废该数据, 是否继续?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }).then(() => {
+                    proxy
+                      .post("/ehsdPurchase/edit", {
+                        id: row.id,
+                        status: 88,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "作废成功",
+                          type: "success",
+                        });
+                        getList();
+                      });
+                  });
+                },
+              }
+            : {},
+          row.status == 30
+            ? {
+                attrs: {
+                  label: "终止",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm("此操作将终止该数据, 是否继续?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }).then(() => {
+                    proxy
+                      .post("/ehsdPurchase/edit", {
+                        id: row.id,
+                        status: 99,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "终止",
+                          type: "success",
+                        });
+                        getList();
+                      });
+                  });
+                },
+              }
+            : {},
+        ];
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    supplierList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/ehsdPurchase/page", sourceList.value.pagination).then((res) => {
+    console.log(res);
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getDict();
+getList();
+const clickPrint = (row) => {
+  console.log(row, "打印");
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+.baseRow {
+  min-height: 24px;
+  border-top: 1px solid black;
+  border-left: 1px solid black;
+}
+.contentRow {
+  border-right: 1px solid black;
+  line-height: 24px;
+  padding-left: 4px;
+}
+</style>

+ 1 - 1
src/views/customer/file/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 1 - 1
src/views/customer/highseas/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 1 - 1
src/views/customer/privatesea/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 442 - 487
src/views/finance/fundManage/accountPayment/index.vue

@@ -1,531 +1,486 @@
 <template>
-	<div class="user">
-		<div class="content">
-			<byTable
-				:source="sourceList.data"
-				:pagination="sourceList.pagination"
-				:config="config"
-				:loading="loading"
-				highlight-current-row
-				:selectConfig="selectConfig"
-				:table-events="{
-					//element talbe事件都能传
-					select: select,
-				}"
-				:action-list="[]"
-				@get-list="getList"
-			>
-				<template #pic="{ item }">
-					<div v-if="item.fileList.length > 0">
-						<img
-							:src="item.fileList[0].fileUrl"
-							class="pic"
-							@click="handleClickFile(item.fileList[0])"
-						/>
-					</div>
-					<div v-else></div>
-				</template>
-			</byTable>
-		</div>
-		<el-dialog
-			:title="modalType == 'add' ? '打款' : '打款'"
-			v-model="dialogVisible"
-			width="500"
-			v-loading="loading"
-		>
-			<byForm
-				:formConfig="formConfig"
-				:formOption="formOption"
-				v-model="formData.data"
-				:rules="rules"
-				ref="byform"
-			>
-				<template #productPic>
-					<div>
-						<el-upload
-							v-model:fileList="fileList"
-							action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-							:data="uploadData"
-							list-type="picture-card"
-							:on-remove="handleRemove"
-							:on-success="handleSuccess"
-							:before-upload="handleBeforeUpload"
-						>
-							<el-icon><Plus /></el-icon>
-						</el-upload>
-					</div>
-				</template>
-			</byForm>
-			<template #footer>
-				<el-button @click="dialogVisible = false" size="large"
-					>取 消</el-button
-				>
-				<el-button
-					type="primary"
-					@click="submitForm('byform')"
-					size="large"
-					:loading="submitLoading"
-				>
-					确 定
-				</el-button>
-			</template>
-		</el-dialog>
-		<el-dialog
-			title="Excel导入"
-			v-model="openExcelDialog"
-			width="400"
-			v-loading="loading"
-		>
-			<template #footer>
-				<el-button @click="openExcelDialog = false" size="large"
-					>取 消</el-button
-				>
-				<el-button
-					type="primary"
-					@click="submitExcel()"
-					size="large"
-					:loading="submitLoading"
-				>
-					确 定
-				</el-button>
-			</template>
-		</el-dialog>
-	</div>
+  <div class="user">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        :action-list="[]"
+        @get-list="getList">
+        <template #pic="{ item }">
+          <div v-if="item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+          </div>
+          <div v-else></div>
+        </template>
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '打款' : '打款'" v-model="dialogVisible" width="500" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+        <template #productPic>
+          <div>
+            <el-upload
+              v-model:fileList="fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              list-type="picture-card"
+              :on-remove="handleRemove"
+              :on-success="handleSuccess"
+              :before-upload="handleBeforeUpload">
+              <el-icon><Plus /></el-icon>
+            </el-upload>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
+      <template #footer>
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading"> 确 定 </el-button>
+      </template>
+    </el-dialog>
+  </div>
 </template>
-  
+
 <script setup>
 /* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from 'element-plus'
-import byTable from '@/components/byTable/index'
-import byForm from '@/components/byForm/index'
-import Cookies from 'js-cookie'
-import { computed, defineComponent, ref } from 'vue'
-const loading = ref(false)
-const submitLoading = ref(false)
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import Cookies from "js-cookie";
+import { computed, defineComponent, ref } from "vue";
+const loading = ref(false);
+const submitLoading = ref(false);
 const sourceList = ref({
-	data: [],
-	pagination: {
-		total: 3,
-		pageNum: 1,
-		pageSize: 10,
-		type: '',
-		productClassifyId: '',
-		keyword: '',
-		definition: '2',
-	},
-})
-let dialogVisible = ref(false)
-let openExcelDialog = ref(false)
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    type: "",
+    productClassifyId: "",
+    keyword: "",
+    definition: "2",
+  },
+});
+let dialogVisible = ref(false);
+let openExcelDialog = ref(false);
 
-let modalType = ref('add')
+let modalType = ref("add");
 let rules = ref({
-	productClassifyId: [
-		{ required: true, message: '请选择物料分类', trigger: 'change' },
-	],
-	type: [{ required: true, message: '请选择物料类型', trigger: 'change' }],
-	name: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
-	unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
-})
-const { proxy } = getCurrentInstance()
+  productClassifyId: [{ required: true, message: "请选择物料分类", trigger: "change" }],
+  type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
+  name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
+  unit: [{ required: true, message: "请选择单位", trigger: "change" }],
+});
+const { proxy } = getCurrentInstance();
 const selectConfig = computed(() => {
-	return [
-		{
-			label: '打款状态',
-			prop: 'paymentStatus',
-			data: [],
-		},
-	]
-})
+  return [
+    {
+      label: "打款状态",
+      prop: "paymentStatus",
+      data: [],
+    },
+  ];
+});
 const config = computed(() => {
-	return [
-		{
-			attrs: {
-				label: '归属公司',
-				prop: 'corporationName',
-			},
-		},
-		{
-			attrs: {
-				label: '归属部门',
-				prop: 'deptName',
-			},
-		},
-		{
-			attrs: {
-				label: '付款类型',
-				prop: 'type',
-			},
-			render(type) {
-				return proxy.dictDataEcho(type, dictsData.payment_status)
-			},
-		},
-		{
-			attrs: {
-				label: '申请人',
-				prop: 'userName',
-			},
-		},
-		{
-			attrs: {
-				label: '申请时间',
-				prop: 'createTime',
-			},
-		},
-		{
-			attrs: {
-				label: '用款时间',
-				prop: 'paymentTime',
-			},
-		},
-		{
-			attrs: {
-				label: '金额',
-				prop: 'amount',
-			},
-		},
-		{
-			attrs: {
-				label: '款项说明',
-				prop: 'paymentRemark',
-			},
-		},
-		{
-			attrs: {
-				label: '打款状态',
-				prop: 'status',
-				
-			},
-			render(status) {
-				return proxy.dictDataEcho(status, dictsData.payment_type)
-			},
-
-		},
-		{
-			attrs: {
-				label: '操作',
-				width: '200',
-				align: 'right',
-			},
-			// 渲染 el-button,一般用在最后一列。
-			renderHTML(row) {
-				return [
-					{
-						attrs: {
-							label: '打款',
-							type: 'primary',
-							text: true,
-						},
-						el: 'button',
-						click() {
-							formOption.disabled = false
-							getDtl(row)
-						},
-					},
-					{
-						attrs: {
-							label: '查看',
-							type: 'primary',
-							text: true,
-						},
-						el: 'button',
-						click() {
-							formOption.disabled = true
-							getDtl(row)
-						},
-					},
-				]
-			},
-		},
-	]
-})
+  return [
+    {
+      attrs: {
+        label: "归属公司",
+        prop: "corporationName",
+      },
+    },
+    {
+      attrs: {
+        label: "归属部门",
+        prop: "deptName",
+      },
+    },
+    {
+      attrs: {
+        label: "付款类型",
+        prop: "type",
+      },
+      render(type) {
+        return proxy.dictDataEcho(type, dictsData.payment_status);
+      },
+    },
+    {
+      attrs: {
+        label: "申请人",
+        prop: "userName",
+      },
+    },
+    {
+      attrs: {
+        label: "申请时间",
+        prop: "createTime",
+      },
+    },
+    {
+      attrs: {
+        label: "用款时间",
+        prop: "paymentTime",
+      },
+    },
+    {
+      attrs: {
+        label: "金额",
+        prop: "amount",
+      },
+    },
+    {
+      attrs: {
+        label: "款项说明",
+        prop: "paymentRemark",
+      },
+    },
+    {
+      attrs: {
+        label: "打款状态",
+        prop: "status",
+      },
+      render(status) {
+        return proxy.dictValueLabel(status, paymentType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "打款",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              formOption.disabled = false;
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "查看",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              formOption.disabled = true;
+              getDtl(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
 
 let formData = reactive({
-	data: {},
-})
+  data: {},
+});
 const formOption = reactive({
-	inline: true,
-	labelWidth: 100,
-	itemWidth: 100,
-	rules: [],
-	disabled:false,
-})
-const byform = ref(null)
-const treeListData = ref([])
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+  disabled: false,
+});
+const byform = ref(null);
+const treeListData = ref([]);
 const formConfig = computed(() => {
-	return [
-		{
-			type: 'title',
-			label: '请款信息',
-		},
-		{
-			type: 'input',
-			prop: 'businessManagementName',
-			label: '付款账户',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'incomeAmount',
-			label: '请款金额',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'paymentMethod',
-			label: '付款方式',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'name',
-			label: '户名',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'accountOpening',
-			label: '银行账号',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'openingBank',
-			label: '开户银行',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'interbankNumber',
-			label: '联行号 / SWIFT Code',
-			readonly: true,
-		},
-		{
-			type: 'input',
-			prop: 'remark',
-			label: '摘要',
-			readonly: true,
-		},
-		{
-			type: 'title',
-			label: '付款信息',
-		},
+  return [
+    {
+      type: "title",
+      label: "请款信息",
+    },
+    {
+      type: "input",
+      prop: "businessManagementName",
+      label: "付款账户",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "incomeAmount",
+      label: "请款金额",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "paymentMethod",
+      label: "付款方式",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "户名",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "银行账号",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户银行",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "interbankNumber",
+      label: "联行号 / SWIFT Code",
+      readonly: true,
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "摘要",
+      readonly: true,
+    },
+    {
+      type: "title",
+      label: "付款信息",
+    },
 
-		{
-			type: 'select',
-			prop: 'accountManagementId',
-			label: '付款账户',
-			required: true,
-			isLoad: {
-				url: '/accountManagement/page',
-				req: {
-					pageNum: 1,
-					pageSize: 9999,
-				},
-				labelKey: 'name',
-				labelVal: 'id',
-				method: 'post',
-				resUrl: 'rows',
-			},
-		},
-		{
-			type: 'selectInput',
-			label: '付款金额',
-			itemWidth: 60,
-			prop: 'amount',
-			data: [],
-			placeholder: '请输入',
-			selectPlaceholder: '币种',
-			selectProp: 'businessCurrency',
-			
-		},
-		{
-			type: 'date',
-			prop: 'expensesTime',
-			label: '打款时间',
-		},
-		{
-			type: 'input',
-			prop: 'remark',
-			label: '摘要',
-		},
-		// {
-		// 	type: 'upload',
-		// 	prop: 'upload',
-		// 	label: '摘要',
-		// },
-		// {
-		// 	type: 'slot',
-		// 	slotName: 'productPic',
-		// 	prop: 'fileList',
-		// 	label: '上传附件',
-		// },
-	]
-})
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "付款账户",
+      required: true,
+      isLoad: {
+        url: "/accountManagement/page",
+        req: {
+          pageNum: 1,
+          pageSize: 9999,
+        },
+        labelKey: "name",
+        labelVal: "id",
+        method: "post",
+        resUrl: "rows",
+      },
+    },
+    {
+      type: "selectInput",
+      label: "付款金额",
+      itemWidth: 60,
+      prop: "amount",
+      data: [],
+      placeholder: "请输入",
+      selectPlaceholder: "币种",
+      selectProp: "currency",
+    },
+    {
+      type: "date",
+      prop: "expensesTime",
+      label: "打款时间",
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "摘要",
+    },
+    // {
+    // 	type: 'upload',
+    // 	prop: 'upload',
+    // 	label: '摘要',
+    // },
+    // {
+    // 	type: 'slot',
+    // 	slotName: 'productPic',
+    // 	prop: 'fileList',
+    // 	label: '上传附件',
+    // },
+  ];
+});
 const newPassword = () => {
-	formData.data.password = generatePassword()
-}
+  formData.data.password = generatePassword();
+};
 const generatePassword = () => {
-	var length = 12,
-		charset =
-			'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
-		password = ''
-	for (var i = 0, n = charset.length; i < length; ++i) {
-		password += charset.charAt(Math.floor(Math.random() * n))
-	}
-	return password
-}
+  var length = 12,
+    charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+    password = "";
+  for (var i = 0, n = charset.length; i < length; ++i) {
+    password += charset.charAt(Math.floor(Math.random() * n));
+  }
+  return password;
+};
 const getList = async (req) => {
-	sourceList.value.pagination = { ...sourceList.value.pagination, ...req }
-	loading.value = true
-	proxy
-		.post('/accountPayment/page', sourceList.value.pagination)
-		.then((message) => {
-			console.log(message)
-			sourceList.value.data = message.rows
-			sourceList.value.pagination.total = message.total
-			setTimeout(() => {
-				loading.value = false
-			}, 200)
-		})
-}
-const uploadData = ref({})
-const fileList = ref([])
-const fileListCopy = ref([])
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/accountPayment/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+const uploadData = ref({});
+const fileList = ref([]);
+const paymentType = ref([
+  {
+    label: "已打款",
+    value: 10,
+  },
+  {
+    label: "未打款",
+    value: 20,
+  },
+]);
+const fileListCopy = ref([]);
 let dictsData = reactive({
-	payment_status: [],
-	payment_type: [],
-	account_currency: [],
-})
-proxy
-	.getDict(['payment_status', 'payment_type','account_currency'])
-	.then((res) => {
-		dictsData = res
-		console.log(res)
-		selectConfig.value[0].data = res.payment_status.map(item => {
-			return {
-				label: item.dictValue,
-				value: item.dictKey,
-			}
-		})
-		formConfig.value[11].data = res.account_currency.map(item => {
-			return {
-				label: item.dictValue,
-				value: item.dictKey,
-			}
-		})
-		console.log(formConfig.value[11].data)	
-	})
+  payment_status: [],
+  account_currency: [],
+});
+proxy.getDict(["payment_status", "account_currency"]).then((res) => {
+  dictsData = res;
+  selectConfig.value[0].data = res.payment_status.map((item) => {
+    return {
+      label: item.dictValue,
+      value: item.dictKey,
+    };
+  });
+  formConfig.value[11].data = res.account_currency.map((item) => {
+    return {
+      label: item.dictValue,
+      value: item.dictKey,
+    };
+  });
+  console.log(formConfig.value[11].data);
+});
 const openModal = () => {
-	dialogVisible.value = true
-	modalType.value = 'add'
-	formData.data = {
-		definition: '2',
-		fileList: [],
-		type: '1',
-	}
-	fileList.value = []
-	fileListCopy.value = []
-}
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    definition: "2",
+    fileList: [],
+    type: "1",
+  };
+  fileList.value = [];
+  fileListCopy.value = [];
+};
 
 const openExcel = () => {
-	openExcelDialog.value = true
-}
+  openExcelDialog.value = true;
+};
 const submitExcel = () => {
-	openExcelDialog.value = false
-}
+  openExcelDialog.value = false;
+};
 const selection = ref({
-	data: [],
-})
+  data: [],
+});
 const select = (_selection, row) => {
-	selection.value.data = _selection
-	console.log(_selection.length)
-}
+  selection.value.data = _selection;
+  console.log(_selection.length);
+};
 
 const submitForm = () => {
-	console.log(fileList)
+  console.log(fileList);
 
-	byform.value.handleSubmit((valid) => {
-		
-		submitLoading.value = true
-		proxy.post('/accountPayment/add', formData.data).then(
-			(res) => {
-				ElMessage({
-					message: '打款成功',
-					type: 'success',
-				})
-				dialogVisible.value = false
-				submitLoading.value = false
-				getList()
-			},
-			(err) => {
-				submitLoading.value = false
-			}
-		)
-	})
-}
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/accountPayment/add", formData.data).then(
+      (res) => {
+        ElMessage({
+          message: "打款成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
 
 const getTreeList = () => {
-	proxy
-		.post('/productClassify/tree', {
-			parentId: '',
-			name: '',
-			definition: '2',
-		})
-		.then((message) => {
-			treeListData.value = message
-			formConfig.value[0].data = message
-		})
-}
+  proxy
+    .post("/productClassify/tree", {
+      parentId: "",
+      name: "",
+      definition: "2",
+    })
+    .then((message) => {
+      treeListData.value = message;
+      formConfig.value[0].data = message;
+    });
+};
 
 const getDtl = (row) => {
-	modalType.value = 'edit'
-	proxy.post('/accountPayment/detail', { id: row.id }).then((res) => {
-		formData.data = res
-		dialogVisible.value = true
-	})
-}
-getTreeList()
-getList()
+  modalType.value = "edit";
+  proxy.post("/accountPayment/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+getTreeList();
+getList();
 const handleBeforeUpload = async (file) => {
-	const res = await proxy.post('/fileInfo/getSing', { fileName: file.name })
-	uploadData.value = res.uploadBody
-	fileListCopy.value.push({
-		id: res.id,
-		fileName: res.fileName,
-		path: res.fileUrl,
-		url: res.fileUrl,
-		uid: file.uid,
-	})
-}
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  fileListCopy.value.push({
+    id: res.id,
+    fileName: res.fileName,
+    path: res.fileUrl,
+    url: res.fileUrl,
+    uid: file.uid,
+  });
+};
 
 const handleSuccess = (res, file, files) => {
-	// 查当前file的index值去赋值对应的copy变量的值
-	// let uid = file.uid;
-	// const index = fileList.value.findIndex((x) => x.uid === uid);
-	// fileListCopy.value[index].uid = uid;
-}
+  // 查当前file的index值去赋值对应的copy变量的值
+  // let uid = file.uid;
+  // const index = fileList.value.findIndex((x) => x.uid === uid);
+  // fileListCopy.value[index].uid = uid;
+};
 
 const handleRemove = (file) => {
-	const index = fileListCopy.value.findIndex(
-		(x) => x.uid === file.uid || x.id === file.id
-	)
-	fileListCopy.value.splice(index, 1)
-}
+  const index = fileListCopy.value.findIndex((x) => x.uid === file.uid || x.id === file.id);
+  fileListCopy.value.splice(index, 1);
+};
 
 const handleClickFile = (file) => {
-	window.open(file.fileUrl, '_blank')
-}
+  window.open(file.fileUrl, "_blank");
+};
 </script>
-  
+
 <style lang="scss" scoped>
 .user {
-	padding: 20px;
+  padding: 20px;
 }
 .pic {
-	object-fit: contain;
-	width: 50px;
-	height: 50px;
-	cursor: pointer;
-	vertical-align: middle;
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
 }
-</style>
+</style>

+ 1 - 2
src/views/finance/fundManage/depExpenses/index.vue

@@ -418,10 +418,9 @@ const getList = async (req) => {
 };
 let dictsData = reactive({})
 proxy
-	.getDict(['payment_status', 'payment_type','account_currency'])
+	.getDict(['payment_status','account_currency'])
 	.then((res) => {
 		dictsData = res
-		console.log(res)
 		formConfig.value[2].data = res.account_currency.map(item => {
 			return {
 				label: item.dictValue,

+ 1 - 2
src/views/finance/fundManage/fundsStatement/index.vue

@@ -118,10 +118,9 @@ let req = ref({
 })
 let dictsData = {}
 proxy
-	.getDict(['payment_status', 'payment_type','account_currency'])
+	.getDict(['payment_status','account_currency'])
 	.then((res) => {
 		dictsData = res
-		console.log(res)
 	})
 
 const getList = async () => {

+ 4 - 10
src/views/process/processApproval/index.vue

@@ -408,15 +408,9 @@ const skipPage = () => {
       path: "/EHSD/saleContract/sampleEHSD",
     });
   } else if (flowForm.flowKey == "ehsd_purchase_flow") {
-    if (flowForm.type === 1) {
-      router.replace({
-        path: "/EHSD/procurement/handoverSlipSampleEHSD",
-      });
-    } else {
-      router.replace({
-        path: "/EHSD/procurement/handoverSlipEHSD",
-      });
-    }
+    router.replace({
+      path: "/EHSD/procurement/purchasedEHSD",
+    });
   } else if (flowForm.flowKey == "service_contract_flow") {
     router.replace({
       path: "/ERP/saleContract/serviceContract",
@@ -465,7 +459,7 @@ onMounted(() => {
   //processType 10 为修改 20为查看
   if (route.query.processType == 10 || route.query.processType == 20) {
     proxy.post("/flowProcess/getStartData", { flowId: route.query.id }).then((res) => {
-      console.log(res,'adawwww');
+      console.log(res, "adawwww");
       queryData.data = { ...res };
     });
   } else {

+ 1 - 1
src/views/process/processConfig/index.vue

@@ -107,7 +107,7 @@
 	</div>
 </template>
     
-  <script setup>
+  <script setup  name="ProcessConfig">
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from 'element-plus'
 import byTable from '@/components/byTable/index'

+ 111 - 145
src/views/product/material/index.vue

@@ -7,8 +7,7 @@
         :data="treeListData"
         v-model="sourceList.pagination.productClassifyId"
         @change="treeChange"
-        @changeTreeList="getTreeList"
-      >
+        @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
@@ -24,46 +23,33 @@
           select: select,
         }"
         :action-list="[
-          {
-            text: 'Excel导入',
-            action: () => openExcel(),
-            disabled: false,
-          },
-          {
-            text: '添加物料',
-            action: () => openModal('add'),
-            disabled: false,
-          },
+          props.selectStatus
+            ? {}
+            : {
+                text: 'Excel导入',
+                action: () => openExcel(),
+                disabled: false,
+              },
+          props.selectStatus
+            ? {}
+            : {
+                text: '添加物料',
+                action: () => openModal('add'),
+                disabled: false,
+              },
         ]"
-        @get-list="getList"
-      >
+        @get-list="getList">
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img
-              :src="item.fileList[0].fileUrl"
-              class="pic"
-              @click="handleClickFile(item.fileList[0])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加' : '编辑'"
-      v-model="dialogVisible"
-      width="500"
-      v-loading="loading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
           <template #productPic>
             <div>
               <el-upload
@@ -73,8 +59,7 @@
                 list-type="picture-card"
                 :on-remove="handleRemove"
                 :on-success="handleSuccess"
-                :before-upload="handleBeforeUpload"
-              >
+                :before-upload="handleBeforeUpload">
                 <el-icon><Plus /></el-icon>
               </el-upload>
             </div>
@@ -84,39 +69,18 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
+        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading"> 确 定 </el-button>
       </template>
     </el-dialog>
   </div>
 </template>
-  
+
 <script setup>
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from "element-plus";
@@ -146,14 +110,15 @@ const materialUnit = ref([]);
 const materialType = ref([]);
 const treeData = ref([]);
 let rules = ref({
-  productClassifyId: [
-    { required: true, message: "请选择物料分类", trigger: "change" },
-  ],
+  productClassifyId: [{ required: true, message: "请选择物料分类", trigger: "change" }],
   type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
   name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
   unit: [{ required: true, message: "请选择单位", trigger: "change" }],
 });
 const { proxy } = getCurrentInstance();
+const props = defineProps({
+  selectStatus: Boolean,
+});
 const selectConfig = reactive([
   {
     label: "物料类型",
@@ -212,60 +177,66 @@ const config = computed(() => {
         prop: "remark",
       },
     },
-
     {
       attrs: {
         label: "操作",
         width: "200",
         align: "right",
       },
-      // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row);
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-            },
-            el: "button",
-            click() {
-              // 弹窗提示是否删除
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                // 删除
-                proxy
-                  .post("/productInfo/delete", {
-                    id: row.id,
-                  })
-                  .then((res) => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
+          props.selectStatus
+            ? {
+                attrs: {
+                  label: "选择",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickSelect(row);
+                },
+              }
+            : {
+                attrs: {
+                  label: "修改",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  getDtl(row);
+                },
+              },
+          props.selectStatus
+            ? {}
+            : {
+                attrs: {
+                  label: "删除",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }).then(() => {
+                    proxy
+                      .post("/productInfo/delete", {
+                        id: row.id,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "删除成功",
+                          type: "success",
+                        });
+                        getList();
+                      });
                   });
-              });
-            },
-          },
+                },
+              },
         ];
       },
     },
@@ -351,33 +322,29 @@ const generatePassword = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/productInfo/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
+  proxy.post("/productInfo/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
 
-      const productIdList = message.rows.map((x) => x.id);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy
-          .post("/fileInfo/getList", { businessIdList: productIdList })
-          .then((fileObj) => {
-            for (let i = 0; i < sourceList.value.data.length; i++) {
-              const e = sourceList.value.data[i];
-              for (const key in fileObj) {
-                if (e.id === key) {
-                  e.fileList = fileObj[key];
-                }
-              }
+    const productIdList = message.rows.map((x) => x.id);
+    // 请求文件数据并回显
+    if (productIdList.length > 0) {
+      proxy.post("/fileInfo/getList", { businessIdList: productIdList }).then((fileObj) => {
+        for (let i = 0; i < sourceList.value.data.length; i++) {
+          const e = sourceList.value.data[i];
+          for (const key in fileObj) {
+            if (e.id === key) {
+              e.fileList = fileObj[key];
             }
-          });
-      }
-    });
+          }
+        }
+      });
+    }
+  });
 };
 const uploadData = ref({});
 const fileList = ref([]);
@@ -443,12 +410,10 @@ const submitForm = () => {
 };
 
 const getTreeList = () => {
-  proxy
-    .post("/productClassify/tree", { parentId: "", name: "", definition: "2" })
-    .then((message) => {
-      treeListData.value = message;
-      treeData.value = message;
-    });
+  proxy.post("/productClassify/tree", { parentId: "", name: "", definition: "2" }).then((message) => {
+    treeListData.value = message;
+    treeData.value = message;
+  });
 };
 
 const getDtl = (row) => {
@@ -484,9 +449,7 @@ const handleSuccess = (res, file, files) => {
 };
 
 const handleRemove = (file) => {
-  const index = fileListCopy.value.findIndex(
-    (x) => x.uid === file.uid || x.id === file.id
-  );
+  const index = fileListCopy.value.findIndex((x) => x.uid === file.uid || x.id === file.id);
   fileListCopy.value.splice(index, 1);
 };
 
@@ -508,8 +471,11 @@ const getDict = () => {
   });
 };
 getDict();
+const clickSelect = (item) => {
+  proxy.$emit("selectMaterial", item);
+};
 </script>
-  
+
 <style lang="scss" scoped>
 .user {
   padding: 20px;
@@ -529,4 +495,4 @@ getDict();
   cursor: pointer;
   vertical-align: middle;
 }
-</style>
+</style>

+ 1 - 1
src/views/publicModule/companyConfig/index.vue

@@ -37,7 +37,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 2 - 2
src/views/salesMange/saleContract/claim/index.vue

@@ -453,9 +453,9 @@ const submitForm = () => {
       }
     }
     const total = list.reduce((total, x) => (total += Number(x.money)), 0);
-    if (Number(formData.data.amount) !== total) {
+    if (Number(formData.data.amount) < total) {
       return ElMessage({
-        message: "认领金额总合和交易金额需一致!",
+        message: "认领金额总合不能大于交易金额!",
         type: "info",
       });
     }