cz 2 жил өмнө
parent
commit
5363ea54a0

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 485 - 163
src/components/process/Contract.vue


+ 433 - 150
src/components/process/PriceSheet.vue

@@ -1,46 +1,77 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <byForm
+      :formConfig="formConfig"
+      :formOption="formOption"
+      v-model="formData.data"
+      :rules="rules"
+      ref="submit"
+    >
       <template #seller>
         <div style="width: 100%">
           <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+            <el-select
+              v-model="formData.data.sellCorporationId"
+              style="width: 100%"
+              disabled
+            >
+              <el-option
+                v-for="item in corporationList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
             </el-select>
           </el-form-item>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="地址" prop="sellCountryId">
-                <el-input v-model="formData.data.sellCountryId" placeholder="请输入国家" />
+                <el-input
+                  v-model="formData.data.sellCountryId"
+                  placeholder="请输入国家"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellProvinceId">
-                <el-input v-model="formData.data.sellProvinceId" placeholder="请输入省/州" />
+                <el-input
+                  v-model="formData.data.sellProvinceId"
+                  placeholder="请输入省/州"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellCityId">
-                <el-input v-model="formData.data.sellCityId" placeholder="请输入城市" />
+                <el-input
+                  v-model="formData.data.sellCityId"
+                  placeholder="请输入城市"
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="24">
               <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
+                <el-input v-model="formData.data.sellAddress" type="textarea">
+                </el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
+                <el-input
+                  v-model="formData.data.sellContactName"
+                  placeholder="请输入联系人"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
+                <el-input
+                  v-model="formData.data.sellContactNumber"
+                  placeholder="请输入联系人电话"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -50,42 +81,81 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model="formData.data.buyCorporationId"
+                style="width: 100%"
+                @change="changeCustomer"
+              >
+                <el-option
+                  v-for="item in customerList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="buyCountryId">
-                  <el-select v-model="formData.data.buyCountryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyCountryId"
+                    placeholder="国家"
+                    @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>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyProvinceId">
-                  <el-select v-model="formData.data.buyProvinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
-                    <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyProvinceId"
+                    placeholder="省/洲"
+                    @change="(val) => getCityData(val, '30', true)"
+                  >
+                    <el-option
+                      v-for="item in provinceData"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyCityId">
-                  <el-select v-model="formData.data.buyCityId" placeholder="城市">
-                    <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyCityId"
+                    placeholder="城市"
+                  >
+                    <el-option
+                      v-for="item in cityData"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
+                  <el-input
+                    v-model="formData.data.buyPostalCode"
+                    placeholder="请输入邮编"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="24">
                 <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
+                  <el-input v-model="formData.data.buyAddress" type="textarea">
+                  </el-input>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -98,13 +168,17 @@
                     clearable
                     class="inline-input w-50"
                     placeholder="请输入联系人"
-                    @select="handlePerson">
+                    @select="handlePerson"
+                  >
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
               <el-col :span="16">
                 <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
+                  <el-input
+                    v-model="formData.data.buyContactNumber"
+                    placeholder="请输入联系人电话"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -114,11 +188,18 @@
       <template #commodity>
         <div style="width: 100%">
           <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.quotationProductList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.quotationProductList"
+            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)" />
+                  <img
+                    :src="row.fileUrl"
+                    class="pic"
+                    @click="onPicture(row.fileUrl)"
+                  />
                 </div>
                 <div v-else></div>
               </template>
@@ -127,8 +208,15 @@
             <el-table-column label="商品名称" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品名称" />
+                  <el-form-item
+                    :prop="'quotationProductList.' + $index + '.productName'"
+                    :rules="rules.productName"
+                    :inline-message="true"
+                  >
+                    <el-input
+                      v-model="row.productName"
+                      placeholder="请输入商品名称"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -136,8 +224,15 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
+                  <el-form-item
+                    :prop="'quotationProductList.' + $index + '.productModel'"
+                    :rules="rules.productModel"
+                    :inline-message="true"
+                  >
+                    <el-input
+                      v-model="row.productModel"
+                      placeholder="请输入规格型号"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -146,7 +241,11 @@
             <el-table-column label="数量" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                  <el-form-item
+                    :prop="'quotationProductList.' + $index + '.quantity'"
+                    :rules="rules.quantity"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.quantity"
                       placeholder="请输入数量"
@@ -154,7 +253,8 @@
                       :precision="0"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -162,7 +262,11 @@
             <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                  <el-form-item
+                    :prop="'quotationProductList.' + $index + '.price'"
+                    :rules="rules.price"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.price"
                       placeholder="请输入单价"
@@ -170,7 +274,8 @@
                       :precision="2"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -178,7 +283,9 @@
             <el-table-column prop="amount" label="金额" width="140" />
             <el-table-column label="操作" width="80" fixed="right">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+                <el-button type="primary" link @click="handleRemove($index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -187,12 +294,25 @@
       <template #otherCharge>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.quotationPayList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.quotationPayList"
+            style="width: 100%; margin-top: 16px"
+          >
             <el-table-column label="收费项目" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                  <el-form-item
+                    :prop="'quotationPayList.' + $index + '.payName'"
+                    :rules="rules.payName"
+                    :inline-message="true"
+                  >
+                    <el-autocomplete
+                      v-model="row.payName"
+                      :fetch-suggestions="querySearch"
+                      clearable
+                      class="inline-input w-50"
+                      placeholder="请输入收费项目"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -200,7 +320,11 @@
             <el-table-column label="金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
+                  <el-form-item
+                    :prop="'quotationPayList.' + $index + '.amount'"
+                    :rules="rules.amount"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.amount"
                       placeholder="请输入金额"
@@ -208,7 +332,8 @@
                       :precision="2"
                       :controls="false"
                       :min="0"
-                      @change="totalAmount()" />
+                      @change="totalAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -216,7 +341,9 @@
             <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'quotationPayList.' + $index + '.remark'">
+                  <el-form-item
+                    :prop="'quotationPayList.' + $index + '.remark'"
+                  >
                     <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
@@ -224,7 +351,9 @@
             </el-table-column>
             <el-table-column label="操作" width="80" fixed="right">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+                <el-button type="primary" link @click="handleDelete($index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -235,27 +364,56 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="4">
               <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.currency"
+                  placeholder="请选择币种"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in accountCurrency"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
+                <el-input
+                  v-model="formData.data.amount"
+                  placeholder="合同总金额"
+                  disabled
+                />
               </el-form-item>
             </el-col>
             <el-col :span="4">
               <el-form-item label="报价有效期 (天)" prop="effective">
-                <el-input-number v-model="formData.data.effective" placeholder="请输入有效期" style="width: 100%" :precision="0" :controls="false" :min="0" />
+                <el-input-number
+                  v-model="formData.data.effective"
+                  placeholder="请输入有效期"
+                  style="width: 100%"
+                  :precision="0"
+                  :controls="false"
+                  :min="0"
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.paymentMethod"
+                  placeholder="请选择付款方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in fundsPaymentMethod"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -268,7 +426,8 @@
                   :precision="2"
                   :controls="false"
                   :min="0"
-                  :max="100" />
+                  :max="100"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -279,8 +438,17 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="贸易方式" prop="tradeMethods">
-                <el-select v-model="formData.data.tradeMethods" placeholder="请选择贸易方式" style="width: 100%">
-                  <el-option v-for="item in tradeMethods" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.tradeMethods"
+                  placeholder="请选择贸易方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in tradeMethods"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -288,28 +456,52 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="运输方式" prop="transportMethod">
-                <el-select v-model="formData.data.transportMethod" placeholder="请选择运输方式" style="width: 100%">
-                  <el-option v-for="item in shippingMethod" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.transportMethod"
+                  placeholder="请选择运输方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in shippingMethod"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item label="运输说明" prop="transportRemark">
-                <el-input v-model="formData.data.transportRemark" placeholder="请输入运输说明" />
+                <el-input
+                  v-model="formData.data.transportRemark"
+                  placeholder="请输入运输说明"
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="14">
               <el-form-item label="付款条件" prop="remark">
-                <el-input v-model="formData.data.remark" :rows="2" type="textarea" placeholder="请输入付款条件" />
+                <el-input
+                  v-model="formData.data.remark"
+                  :rows="2"
+                  type="textarea"
+                  placeholder="请输入付款条件"
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="质保期 (天)" prop="warranty">
-                <el-input-number v-model="formData.data.warranty" placeholder="请输入质保期" style="width: 100%" :precision="0" :controls="false" :min="0" />
+                <el-input-number
+                  v-model="formData.data.warranty"
+                  placeholder="请输入质保期"
+                  style="width: 100%"
+                  :precision="0"
+                  :controls="false"
+                  :min="0"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -317,8 +509,16 @@
       </template>
     </byForm>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog
+      v-model="openProduct"
+      title="选择商品"
+      width="70%"
+      append-to-body
+    >
+      <SelectGoods
+        @cancel="openProduct = false"
+        @pushGoods="pushGoods"
+      ></SelectGoods>
     </el-dialog>
   </div>
 </template>
@@ -405,26 +605,50 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  contractTemplateId: [
+    { required: true, message: "请选择合同模板", trigger: "change" },
+  ],
+  buyCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
+  ],
   buyCountryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  buyProvinceId: [{ required: true, message: "请选择省/州", trigger: "change" }],
+  buyProvinceId: [
+    { required: true, message: "请选择省/州", trigger: "change" },
+  ],
   buyCityId: [{ required: true, message: "请选择城市", trigger: "change" }],
   // buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
+  productModel: [
+    { required: true, message: "请输入规格型号", trigger: "blur" },
+  ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
-  transportMethod: [{ required: true, message: "请选择运输方式", trigger: "change" }],
-  transportRemark: [{ required: true, message: "请输入运输说明", trigger: "blur" }],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  tradeMethods: [
+    { required: true, message: "请选择贸易方式", trigger: "change" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  transportRemark: [
+    { required: true, message: "请输入运输说明", trigger: "blur" },
+  ],
   remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
 });
 const getDict = () => {
@@ -496,15 +720,17 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -530,7 +756,9 @@ const changeTemplate = (val) => {
     proxy.post("/contractTemplate/detail", { id: val }).then(
       (res) => {
         proxy.post("/areaInfo/list", { parentId: "0" }).then((resCountry) => {
-          let sellCountryData = resCountry.filter((item) => item.id === res.countryId);
+          let sellCountryData = resCountry.filter(
+            (item) => item.id === res.countryId
+          );
           if (sellCountryData && sellCountryData.length > 0) {
             formData.data.sellCountryId = sellCountryData[0].chineseName;
           } else {
@@ -538,26 +766,34 @@ const changeTemplate = (val) => {
           }
         });
         if (res.countryId) {
-          proxy.post("/areaInfo/list", { parentId: res.countryId }).then((resProvince) => {
-            let sellProvinceData = resProvince.filter((item) => item.id === res.provinceId);
-            if (sellProvinceData && sellProvinceData.length > 0) {
-              formData.data.sellProvinceId = sellProvinceData[0].name;
-            } else {
-              formData.data.sellProvinceId = "";
-            }
-          });
+          proxy
+            .post("/areaInfo/list", { parentId: res.countryId })
+            .then((resProvince) => {
+              let sellProvinceData = resProvince.filter(
+                (item) => item.id === res.provinceId
+              );
+              if (sellProvinceData && sellProvinceData.length > 0) {
+                formData.data.sellProvinceId = sellProvinceData[0].name;
+              } else {
+                formData.data.sellProvinceId = "";
+              }
+            });
         } else {
           formData.data.sellProvinceId = "";
         }
         if (res.provinceId) {
-          proxy.post("/areaInfo/list", { parentId: res.provinceId }).then((resCity) => {
-            let sellCityData = resCity.filter((item) => item.id === res.cityId);
-            if (sellCityData && sellCityData.length > 0) {
-              formData.data.sellCityId = sellCityData[0].name;
-            } else {
-              formData.data.sellCityId = "";
-            }
-          });
+          proxy
+            .post("/areaInfo/list", { parentId: res.provinceId })
+            .then((resCity) => {
+              let sellCityData = resCity.filter(
+                (item) => item.id === res.cityId
+              );
+              if (sellCityData && sellCityData.length > 0) {
+                formData.data.sellCityId = sellCityData[0].name;
+              } else {
+                formData.data.sellCityId = "";
+              }
+            });
         } else {
           formData.data.sellCityId = "";
         }
@@ -649,11 +885,15 @@ const changeCustomer = (val) => {
 };
 const createFilter = (queryString) => {
   return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
+    return (
+      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+    );
   };
 };
 const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
+  const results = queryString
+    ? customerUserList.value.filter(createFilter(queryString))
+    : customerUserList.value;
   callback(results);
 };
 const handlePerson = (item) => {
@@ -661,26 +901,27 @@ const handlePerson = (item) => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
-    formData.data.quotationProductList = formData.data.quotationProductList.concat(
-      goods.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        return {
-          fileUrl: fileUrl,
-          code: item.code,
-          productId: item.id,
-          productName: item.name,
-          productModel: item.spec,
-          unit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: item.remark,
-        };
-      })
-    );
+    formData.data.quotationProductList =
+      formData.data.quotationProductList.concat(
+        goods.map((item) => {
+          let fileUrl = "";
+          if (item.fileList && item.fileList.length > 0) {
+            fileUrl = item.fileList[0].fileUrl;
+          }
+          return {
+            fileUrl: fileUrl,
+            code: item.code,
+            productId: item.id,
+            productName: item.name,
+            productModel: item.spec,
+            unit: item.unit,
+            quantity: undefined,
+            price: undefined,
+            amount: "",
+            remark: item.remark,
+          };
+        })
+      );
     ElMessage({
       message: "添加成功!",
       type: "success",
@@ -698,11 +939,20 @@ const handleRemove = (index) => {
 };
 const calculationAmount = () => {
   nextTick(() => {
-    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
       for (let i = 0; i < formData.data.quotationProductList.length; i++) {
         let money = 0;
-        if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
-          money = parseFloat(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price)).toFixed(2);
+        if (
+          formData.data.quotationProductList[i].quantity &&
+          formData.data.quotationProductList[i].price
+        ) {
+          money = parseFloat(
+            Number(formData.data.quotationProductList[i].quantity) *
+              Number(formData.data.quotationProductList[i].price)
+          ).toFixed(2);
         }
         formData.data.quotationProductList[i].amount = money;
       }
@@ -714,27 +964,46 @@ const calculationAmount = () => {
 };
 const totalAmount = () => {
   let money = 0;
-  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+  if (
+    formData.data.quotationProductList &&
+    formData.data.quotationProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.quotationProductList.length; i++) {
       if (formData.data.quotationProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.quotationProductList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.quotationProductList[i].amount)
+        ).toFixed(2);
       }
     }
   }
-  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+  if (
+    formData.data.quotationPayList &&
+    formData.data.quotationPayList.length > 0
+  ) {
     for (let i = 0; i < formData.data.quotationPayList.length; i++) {
       if (formData.data.quotationPayList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.quotationPayList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.quotationPayList[i].amount)
+        ).toFixed(2);
       }
     }
   }
   formData.data.amount = money;
 };
 const clickAdd = () => {
-  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-    formData.data.quotationPayList.push({ payName: "", amount: undefined, remark: "" });
+  if (
+    formData.data.quotationPayList &&
+    formData.data.quotationPayList.length > 0
+  ) {
+    formData.data.quotationPayList.push({
+      payName: "",
+      amount: undefined,
+      remark: "",
+    });
   } else {
-    formData.data.quotationPayList = [{ payName: "", amount: undefined, remark: "" }];
+    formData.data.quotationPayList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
   }
 };
 const handleDelete = (index) => {
@@ -758,7 +1027,10 @@ const querySearch = (queryString, callback) => {
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
-    if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
       return true;
     } else {
       ElMessage("请添加至少一件商品");
@@ -773,31 +1045,42 @@ const props = defineProps({
 });
 onMounted(() => {
   if (props.queryData.id) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.id }).then((res) => {
-      for (var text in res) {
-        formData.data[text] = res[text];
-      }
-      delete formData.data.id;
-      delete formData.data.code;
-      getCityData(formData.data.buyCountryId, "20");
-      getCityData(formData.data.buyProvinceId, "30");
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
-        formData.data.quotationProductList = formData.data.quotationProductList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
-        formData.data.quotationPayList = formData.data.quotationPayList.map((item) => {
-          delete item.id;
-          return {
-            ...item,
-          };
-        });
-      }
-    });
+    proxy
+      .post("/saleQuotation/detail", { id: props.queryData.id })
+      .then((res) => {
+        for (var text in res) {
+          formData.data[text] = res[text];
+        }
+        delete formData.data.id;
+        delete formData.data.code;
+        getCityData(formData.data.buyCountryId, "20");
+        getCityData(formData.data.buyProvinceId, "30");
+        if (
+          formData.data.quotationProductList &&
+          formData.data.quotationProductList.length > 0
+        ) {
+          formData.data.quotationProductList =
+            formData.data.quotationProductList.map((item) => {
+              delete item.id;
+              return {
+                ...item,
+              };
+            });
+        }
+        if (
+          formData.data.quotationPayList &&
+          formData.data.quotationPayList.length > 0
+        ) {
+          formData.data.quotationPayList = formData.data.quotationPayList.map(
+            (item) => {
+              delete item.id;
+              return {
+                ...item,
+              };
+            }
+          );
+        }
+      });
   }
 });
 // 向父组件暴露

+ 109 - 37
src/components/process/PurchasePayment.vue

@@ -1,14 +1,31 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <byForm
+      :formConfig="formConfig"
+      :formOption="formOption"
+      v-model="formData.data"
+      :rules="rules"
+      ref="submit"
+    >
       <template #deadline>
         <div>
-          <el-date-picker v-model="formData.data.deadline" type="date" placeholder="请选择付款期限" value-format="YYYY-MM-DD" />
+          <el-date-picker
+            v-model="formData.data.deadline"
+            type="date"
+            placeholder="请选择付款期限"
+            value-format="YYYY-MM-DD"
+          />
         </div>
       </template>
       <template #receiptsNum>
         <div>
-          <el-input-number v-model="formData.data.receiptsNum" placeholder="请输入单据数量" :min="0" :precision="0" :controls="false" />
+          <el-input-number
+            v-model="formData.data.receiptsNum"
+            placeholder="请输入单据数量"
+            :min="0"
+            :precision="0"
+            :controls="false"
+          />
         </div>
       </template>
       <template #fileList>
@@ -19,7 +36,8 @@
             multiple
             :data="uploadData"
             :before-upload="uploadFile"
-            :on-preview="onPreviewFile">
+            :on-preview="onPreviewFile"
+          >
             <el-button>选择</el-button>
           </el-upload>
         </div>
@@ -27,25 +45,54 @@
       <template #payDetailList>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.payDetailList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.payDetailList"
+            style="width: 100%; margin-top: 16px"
+          >
             <el-table-column label="采购合同" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.purchaseId'" :rules="rules.purchaseId" :inline-message="true">
-                    <el-select v-model="row.purchaseId" placeholder="请选择采购合同" style="width: 100%" @change="changePurchaseId(row)">
-                      <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
+                  <el-form-item
+                    :prop="'payDetailList.' + $index + '.purchaseId'"
+                    :rules="rules.purchaseId"
+                    :inline-message="true"
+                  >
+                    <el-select
+                      v-model="row.purchaseId"
+                      placeholder="请选择采购合同"
+                      style="width: 100%"
+                      @change="changePurchaseId(row)"
+                    >
+                      <el-option
+                        v-for="item in contractList"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      />
                     </el-select>
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="合同金额" width="140" />
-            <el-table-column prop="sumPayMoney" label="已收发票金额" width="140" />
+            <el-table-column
+              prop="sumPayMoney"
+              label="已收发票金额"
+              width="140"
+            />
             <el-table-column label="款项说明">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
-                    <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
+                  <el-form-item
+                    :prop="'payDetailList.' + $index + '.remark'"
+                    :rules="rules.remark"
+                    :inline-message="true"
+                  >
+                    <el-input
+                      v-model="row.remark"
+                      placeholder="请输入款项说明"
+                      style="width: 100%"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -53,7 +100,11 @@
             <el-table-column label="付款金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
+                  <el-form-item
+                    :prop="'payDetailList.' + $index + '.money'"
+                    :rules="rules.money"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.money"
                       placeholder="请输入金额"
@@ -62,14 +113,17 @@
                       :controls="false"
                       :min="0"
                       :disabled="row.id"
-                      @change="changeMoney()" />
+                      @change="changeMoney()"
+                    />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column label="操作" width="80">
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+                <el-button type="primary" link @click="handleRemove($index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -230,10 +284,16 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
-  invoiceType: [{ required: true, message: "请选择发票类型", trigger: "change" }],
+  invoiceType: [
+    { required: true, message: "请选择发票类型", trigger: "change" },
+  ],
   payType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  accountManagementId: [{ required: true, message: "请选择付款账户", trigger: "change" }],
-  purchaseId: [{ required: true, message: "请选择采购合同", trigger: "change" }],
+  accountManagementId: [
+    { required: true, message: "请选择付款账户", trigger: "change" },
+  ],
+  purchaseId: [
+    { required: true, message: "请选择采购合同", trigger: "change" },
+  ],
   money: [{ required: true, message: "请输入付款金额", trigger: "blur" }],
 });
 const fileList = ref([]);
@@ -273,28 +333,32 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      supplierList.value = res.rows.map((item) => {
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        supplierList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
         return {
-          label: item.name,
+          bankName: item.name,
+          accountOpening: item.accountOpening,
+          openingBank: item.openingBank,
+          interbankNumber: item.interbankNumber,
+          label: item.alias,
           value: item.id,
         };
       });
-    }
-  });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        bankName: item.name,
-        accountOpening: item.accountOpening,
-        openingBank: item.openingBank,
-        interbankNumber: item.interbankNumber,
-        label: item.alias,
-        value: item.id,
-      };
     });
-  });
 };
 getDict();
 const uploadFile = async (file) => {
@@ -330,9 +394,15 @@ const changeSupply = (val) => {
 };
 const clickAdd = () => {
   if (formData.data.payDetailList && formData.data.payDetailList.length > 0) {
-    formData.data.payDetailList.push({ purchaseId: "", money: undefined, remark: "" });
+    formData.data.payDetailList.push({
+      purchaseId: "",
+      money: undefined,
+      remark: "",
+    });
   } else {
-    formData.data.payDetailList = [{ purchaseId: "", money: undefined, remark: "" }];
+    formData.data.payDetailList = [
+      { purchaseId: "", money: undefined, remark: "" },
+    ];
   }
 };
 const handleRemove = (index) => {
@@ -363,7 +433,9 @@ const changeMoney = () => {
   let money = 0;
   for (let i = 0; i < formData.data.payDetailList.length; i++) {
     if (formData.data.payDetailList[i].money) {
-      money = parseFloat(Number(money) + Number(formData.data.payDetailList[i].money)).toFixed(2);
+      money = parseFloat(
+        Number(money) + Number(formData.data.payDetailList[i].money)
+      ).toFixed(2);
     }
   }
   formData.data.amount = money;

+ 441 - 158
src/components/process/ServiceContract.vue

@@ -1,46 +1,77 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <byForm
+      :formConfig="formConfig"
+      :formOption="formOption"
+      v-model="formData.data"
+      :rules="rules"
+      ref="submit"
+    >
       <template #seller>
         <div style="width: 100%">
           <el-form-item prop="sellCorporationId">
-            <el-select v-model="formData.data.sellCorporationId" style="width: 100%" disabled>
-              <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+            <el-select
+              v-model="formData.data.sellCorporationId"
+              style="width: 100%"
+              disabled
+            >
+              <el-option
+                v-for="item in corporationList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
             </el-select>
           </el-form-item>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="地址" prop="sellCountryId">
-                <el-input v-model="formData.data.sellCountryId" placeholder="请输入国家" />
+                <el-input
+                  v-model="formData.data.sellCountryId"
+                  placeholder="请输入国家"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellProvinceId">
-                <el-input v-model="formData.data.sellProvinceId" placeholder="请输入省/州" />
+                <el-input
+                  v-model="formData.data.sellProvinceId"
+                  placeholder="请输入省/州"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label=" " prop="sellCityId">
-                <el-input v-model="formData.data.sellCityId" placeholder="请输入城市" />
+                <el-input
+                  v-model="formData.data.sellCityId"
+                  placeholder="请输入城市"
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="24">
               <el-form-item prop="sellAddress">
-                <el-input v-model="formData.data.sellAddress" type="textarea"> </el-input>
+                <el-input v-model="formData.data.sellAddress" type="textarea">
+                </el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="8">
               <el-form-item label="联系人" prop="sellContactName">
-                <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
+                <el-input
+                  v-model="formData.data.sellContactName"
+                  placeholder="请输入联系人"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label=" " prop="sellContactNumber">
-                <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
+                <el-input
+                  v-model="formData.data.sellContactNumber"
+                  placeholder="请输入联系人电话"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -50,42 +81,81 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeCustomer">
-                <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model="formData.data.buyCorporationId"
+                style="width: 100%"
+                @change="changeCustomer"
+              >
+                <el-option
+                  v-for="item in customerList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="buyCountryId">
-                  <el-select v-model="formData.data.buyCountryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyCountryId"
+                    placeholder="国家"
+                    @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>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyProvinceId">
-                  <el-select v-model="formData.data.buyProvinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
-                    <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyProvinceId"
+                    placeholder="省/洲"
+                    @change="(val) => getCityData(val, '30', true)"
+                  >
+                    <el-option
+                      v-for="item in provinceData"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyCityId">
-                  <el-select v-model="formData.data.buyCityId" placeholder="城市">
-                    <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                  <el-select
+                    v-model="formData.data.buyCityId"
+                    placeholder="城市"
+                  >
+                    <el-option
+                      v-for="item in cityData"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item label=" " prop="buyPostalCode">
-                  <el-input v-model="formData.data.buyPostalCode" placeholder="请输入邮编" />
+                  <el-input
+                    v-model="formData.data.buyPostalCode"
+                    placeholder="请输入邮编"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="24">
                 <el-form-item prop="buyAddress">
-                  <el-input v-model="formData.data.buyAddress" type="textarea"> </el-input>
+                  <el-input v-model="formData.data.buyAddress" type="textarea">
+                  </el-input>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -98,13 +168,17 @@
                     clearable
                     class="inline-input w-50"
                     placeholder="请输入联系人"
-                    @select="handlePerson">
+                    @select="handlePerson"
+                  >
                   </el-autocomplete>
                 </el-form-item>
               </el-col>
               <el-col :span="16">
                 <el-form-item label=" " prop="buyContactNumber">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
+                  <el-input
+                    v-model="formData.data.buyContactNumber"
+                    placeholder="请输入联系人电话"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -113,17 +187,27 @@
       </template>
       <template #sellerOther>
         <div style="width: 100%">
-          <Editor :value="formData.data.remark" @updateValue="updateContentSeller" />
+          <Editor
+            :value="formData.data.remark"
+            @updateValue="updateContentSeller"
+          />
         </div>
       </template>
       <template #commodity>
         <div style="width: 100%">
           <el-button @click="openProduct = true">添加商品</el-button>
-          <el-table :data="formData.data.serviceContractProductList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.serviceContractProductList"
+            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)" />
+                  <img
+                    :src="row.fileUrl"
+                    class="pic"
+                    @click="onPicture(row.fileUrl)"
+                  />
                 </div>
                 <div v-else></div>
               </template>
@@ -132,8 +216,17 @@
             <el-table-column label="商品名称" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
-                    <el-input v-model="row.productName" placeholder="请输入商品名称" />
+                  <el-form-item
+                    :prop="
+                      'serviceContractProductList.' + $index + '.productName'
+                    "
+                    :rules="rules.productName"
+                    :inline-message="true"
+                  >
+                    <el-input
+                      v-model="row.productName"
+                      placeholder="请输入商品名称"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -141,8 +234,17 @@
             <el-table-column label="规格型号" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
-                    <el-input v-model="row.productModel" placeholder="请输入规格型号" />
+                  <el-form-item
+                    :prop="
+                      'serviceContractProductList.' + $index + '.productModel'
+                    "
+                    :rules="rules.productModel"
+                    :inline-message="true"
+                  >
+                    <el-input
+                      v-model="row.productModel"
+                      placeholder="请输入规格型号"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -151,7 +253,11 @@
             <el-table-column label="数量" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                  <el-form-item
+                    :prop="'serviceContractProductList.' + $index + '.quantity'"
+                    :rules="rules.quantity"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.quantity"
                       placeholder="请输入数量"
@@ -159,7 +265,8 @@
                       :precision="0"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -167,7 +274,11 @@
             <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
+                  <el-form-item
+                    :prop="'serviceContractProductList.' + $index + '.price'"
+                    :rules="rules.price"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.price"
                       placeholder="请输入单价"
@@ -175,16 +286,29 @@
                       :precision="2"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
             <el-table-column prop="amount" label="金额" width="140" />
-            <el-table-column align="center" label="操作" width="120" fixed="right">
+            <el-table-column
+              align="center"
+              label="操作"
+              width="120"
+              fixed="right"
+            >
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleHandover(row, $index)">交接单</el-button>
-                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+                <el-button
+                  type="primary"
+                  link
+                  @click="handleHandover(row, $index)"
+                  >交接单</el-button
+                >
+                <el-button type="primary" link @click="handleRemove($index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -193,12 +317,25 @@
       <template #otherCharge>
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
-          <el-table :data="formData.data.serviceContractPayList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.serviceContractPayList"
+            style="width: 100%; margin-top: 16px"
+          >
             <el-table-column label="收费项目" width="220">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
-                    <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
+                  <el-form-item
+                    :prop="'serviceContractPayList.' + $index + '.payName'"
+                    :rules="rules.payName"
+                    :inline-message="true"
+                  >
+                    <el-autocomplete
+                      v-model="row.payName"
+                      :fetch-suggestions="querySearch"
+                      clearable
+                      class="inline-input w-50"
+                      placeholder="请输入收费项目"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -206,7 +343,11 @@
             <el-table-column label="金额" width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
+                  <el-form-item
+                    :prop="'serviceContractPayList.' + $index + '.amount'"
+                    :rules="rules.amount"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.amount"
                       placeholder="请输入金额"
@@ -214,7 +355,8 @@
                       :precision="2"
                       :controls="false"
                       :min="0"
-                      @change="totalAmount()" />
+                      @change="totalAmount()"
+                    />
                   </el-form-item>
                 </div>
               </template>
@@ -222,15 +364,24 @@
             <el-table-column label="备注">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'serviceContractPayList.' + $index + '.remark'">
+                  <el-form-item
+                    :prop="'serviceContractPayList.' + $index + '.remark'"
+                  >
                     <el-input v-model="row.remark" placeholder="请输入备注" />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column align="center" label="操作" width="80" fixed="right">
+            <el-table-column
+              align="center"
+              label="操作"
+              width="80"
+              fixed="right"
+            >
               <template #default="{ row, $index }">
-                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+                <el-button type="primary" link @click="handleDelete($index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -241,22 +392,44 @@
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="4">
               <el-form-item label="币种" prop="currency">
-                <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                  <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.currency"
+                  placeholder="请选择币种"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in accountCurrency"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="合同总金额" prop="amount">
-                <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
+                <el-input
+                  v-model="formData.data.amount"
+                  placeholder="合同总金额"
+                  disabled
+                />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="7">
               <el-form-item label="付款方式" prop="paymentMethod">
-                <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
-                  <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.paymentMethod"
+                  placeholder="请选择付款方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in fundsPaymentMethod"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -269,13 +442,23 @@
                   :precision="2"
                   :controls="false"
                   :min="0"
-                  :max="100" />
+                  :max="100"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item label="收款账号" prop="shroffAccountId">
-                <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" style="width: 100%">
-                  <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
+                <el-select
+                  v-model="formData.data.shroffAccountId"
+                  placeholder="请选择收款账号"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in accountList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -284,15 +467,35 @@
       </template>
     </byForm>
 
-    <el-dialog v-model="openProduct" title="选择商品" width="70%" append-to-body>
-      <SelectGoods @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog
+      v-model="openProduct"
+      title="选择商品"
+      width="70%"
+      append-to-body
+    >
+      <SelectGoods
+        @cancel="openProduct = false"
+        @pushGoods="pushGoods"
+      ></SelectGoods>
     </el-dialog>
 
-    <el-dialog title="交接单" v-if="openHandover" v-model="openHandover" width="800">
-      <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
+    <el-dialog
+      title="交接单"
+      v-if="openHandover"
+      v-model="openHandover"
+      width="800"
+    >
+      <byForm
+        :formConfig="formHandoverConfig"
+        :formOption="formOption"
+        v-model="productRow.data"
+      >
         <template #remark>
           <div style="width: 100%">
-            <Editor :value="productRow.data.remark" @updateValue="updateContent" />
+            <Editor
+              :value="productRow.data.remark"
+              @updateValue="updateContent"
+            />
           </div>
         </template>
         <template #file>
@@ -303,7 +506,8 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -311,7 +515,9 @@
       </byForm>
       <template #footer>
         <el-button @click="openHandover = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitHandoverForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -400,23 +606,43 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
-  buyCorporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+  contractTemplateId: [
+    { required: true, message: "请选择合同模板", trigger: "change" },
+  ],
+  buyCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
+  ],
   buyCountryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  buyProvinceId: [{ required: true, message: "请选择省/州", trigger: "change" }],
+  buyProvinceId: [
+    { required: true, message: "请选择省/州", trigger: "change" },
+  ],
   buyCityId: [{ required: true, message: "请选择城市", trigger: "change" }],
   // buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
-  buyContactName: [{ required: true, message: "请输入联系人", trigger: ["change", "blur"] }],
-  buyContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
   productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
-  productModel: [{ required: true, message: "请输入规格型号", trigger: "blur" }],
+  productModel: [
+    { required: true, message: "请输入规格型号", trigger: "blur" },
+  ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
-  advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
-  shroffAccountId: [{ required: true, message: "请选择收款账号", trigger: "change" }],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
 });
 const getDict = () => {
   proxy
@@ -453,15 +679,17 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    templateList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.templateName,
-        value: item.id,
-      };
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -480,14 +708,16 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
 };
 getDict();
 const changeTemplate = (val) => {
@@ -495,7 +725,9 @@ const changeTemplate = (val) => {
     proxy.post("/contractTemplate/detail", { id: val }).then(
       (res) => {
         proxy.post("/areaInfo/list", { parentId: "0" }).then((resCountry) => {
-          let sellCountryData = resCountry.filter((item) => item.id === res.countryId);
+          let sellCountryData = resCountry.filter(
+            (item) => item.id === res.countryId
+          );
           if (sellCountryData && sellCountryData.length > 0) {
             formData.data.sellCountryId = sellCountryData[0].chineseName;
           } else {
@@ -503,26 +735,34 @@ const changeTemplate = (val) => {
           }
         });
         if (res.countryId) {
-          proxy.post("/areaInfo/list", { parentId: res.countryId }).then((resProvince) => {
-            let sellProvinceData = resProvince.filter((item) => item.id === res.provinceId);
-            if (sellProvinceData && sellProvinceData.length > 0) {
-              formData.data.sellProvinceId = sellProvinceData[0].name;
-            } else {
-              formData.data.sellProvinceId = "";
-            }
-          });
+          proxy
+            .post("/areaInfo/list", { parentId: res.countryId })
+            .then((resProvince) => {
+              let sellProvinceData = resProvince.filter(
+                (item) => item.id === res.provinceId
+              );
+              if (sellProvinceData && sellProvinceData.length > 0) {
+                formData.data.sellProvinceId = sellProvinceData[0].name;
+              } else {
+                formData.data.sellProvinceId = "";
+              }
+            });
         } else {
           formData.data.sellProvinceId = "";
         }
         if (res.provinceId) {
-          proxy.post("/areaInfo/list", { parentId: res.provinceId }).then((resCity) => {
-            let sellCityData = resCity.filter((item) => item.id === res.cityId);
-            if (sellCityData && sellCityData.length > 0) {
-              formData.data.sellCityId = sellCityData[0].name;
-            } else {
-              formData.data.sellCityId = "";
-            }
-          });
+          proxy
+            .post("/areaInfo/list", { parentId: res.provinceId })
+            .then((resCity) => {
+              let sellCityData = resCity.filter(
+                (item) => item.id === res.cityId
+              );
+              if (sellCityData && sellCityData.length > 0) {
+                formData.data.sellCityId = sellCityData[0].name;
+              } else {
+                formData.data.sellCityId = "";
+              }
+            });
         } else {
           formData.data.sellCityId = "";
         }
@@ -614,11 +854,15 @@ const changeCustomer = (val) => {
 };
 const createFilter = (queryString) => {
   return (restaurant) => {
-    return restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
+    return (
+      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+    );
   };
 };
 const querySearchPerson = (queryString, callback) => {
-  const results = queryString ? customerUserList.value.filter(createFilter(queryString)) : customerUserList.value;
+  const results = queryString
+    ? customerUserList.value.filter(createFilter(queryString))
+    : customerUserList.value;
   callback(results);
 };
 const handlePerson = (item) => {
@@ -626,27 +870,28 @@ const handlePerson = (item) => {
 };
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
-    formData.data.serviceContractProductList = formData.data.serviceContractProductList.concat(
-      goods.map((item) => {
-        let fileUrl = "";
-        if (item.fileList && item.fileList.length > 0) {
-          fileUrl = item.fileList[0].fileUrl;
-        }
-        return {
-          fileUrl: fileUrl,
-          code: item.code,
-          productId: item.id,
-          productName: item.name,
-          productModel: item.spec,
-          unit: item.unit,
-          quantity: undefined,
-          price: undefined,
-          amount: "",
-          remark: "",
-          fileList: [],
-        };
-      })
-    );
+    formData.data.serviceContractProductList =
+      formData.data.serviceContractProductList.concat(
+        goods.map((item) => {
+          let fileUrl = "";
+          if (item.fileList && item.fileList.length > 0) {
+            fileUrl = item.fileList[0].fileUrl;
+          }
+          return {
+            fileUrl: fileUrl,
+            code: item.code,
+            productId: item.id,
+            productName: item.name,
+            productModel: item.spec,
+            unit: item.unit,
+            quantity: undefined,
+            price: undefined,
+            amount: "",
+            remark: "",
+            fileList: [],
+          };
+        })
+      );
     ElMessage({
       message: "添加成功!",
       type: "success",
@@ -738,15 +983,17 @@ const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
 const submitHandoverForm = () => {
-  formData.data.serviceContractProductList[productIndex.value].remark = productRow.data.remark;
+  formData.data.serviceContractProductList[productIndex.value].remark =
+    productRow.data.remark;
   if (fileList.value && fileList.value.length > 0) {
-    formData.data.serviceContractProductList[productIndex.value].fileList = fileList.value.map((item) => {
-      return {
-        id: item.raw.id,
-        fileName: item.raw.fileName,
-        fileUrl: item.raw.fileUrl,
-      };
-    });
+    formData.data.serviceContractProductList[productIndex.value].fileList =
+      fileList.value.map((item) => {
+        return {
+          id: item.raw.id,
+          fileName: item.raw.fileName,
+          fileUrl: item.raw.fileUrl,
+        };
+      });
   } else {
     formData.data.serviceContractProductList[productIndex.value].fileList = [];
   }
@@ -757,13 +1004,24 @@ const handleRemove = (index) => {
 };
 const calculationAmount = () => {
   nextTick(() => {
-    if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
-      for (let i = 0; i < formData.data.serviceContractProductList.length; i++) {
+    if (
+      formData.data.serviceContractProductList &&
+      formData.data.serviceContractProductList.length > 0
+    ) {
+      for (
+        let i = 0;
+        i < formData.data.serviceContractProductList.length;
+        i++
+      ) {
         let money = 0;
-        if (formData.data.serviceContractProductList[i].quantity && formData.data.serviceContractProductList[i].price) {
-          money = parseFloat(Number(formData.data.serviceContractProductList[i].quantity) * Number(formData.data.serviceContractProductList[i].price)).toFixed(
-            2
-          );
+        if (
+          formData.data.serviceContractProductList[i].quantity &&
+          formData.data.serviceContractProductList[i].price
+        ) {
+          money = parseFloat(
+            Number(formData.data.serviceContractProductList[i].quantity) *
+              Number(formData.data.serviceContractProductList[i].price)
+          ).toFixed(2);
         }
         formData.data.serviceContractProductList[i].amount = money;
       }
@@ -775,51 +1033,76 @@ const calculationAmount = () => {
 };
 const totalAmount = () => {
   let money = 0;
-  if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
+  if (
+    formData.data.serviceContractProductList &&
+    formData.data.serviceContractProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.serviceContractProductList.length; i++) {
       if (formData.data.serviceContractProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.serviceContractProductList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) +
+            Number(formData.data.serviceContractProductList[i].amount)
+        ).toFixed(2);
       }
     }
   }
-  if (formData.data.serviceContractPayList && formData.data.serviceContractPayList.length > 0) {
+  if (
+    formData.data.serviceContractPayList &&
+    formData.data.serviceContractPayList.length > 0
+  ) {
     for (let i = 0; i < formData.data.serviceContractPayList.length; i++) {
       if (formData.data.serviceContractPayList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.serviceContractPayList[i].amount)).toFixed(2);
+        money = parseFloat(
+          Number(money) + Number(formData.data.serviceContractPayList[i].amount)
+        ).toFixed(2);
       }
     }
   }
   formData.data.amount = money;
 };
 const clickAdd = () => {
-  if (formData.data.serviceContractPayList && formData.data.serviceContractPayList.length > 0) {
-    formData.data.serviceContractPayList.push({ payName: "", amount: undefined, remark: "" });
+  if (
+    formData.data.serviceContractPayList &&
+    formData.data.serviceContractPayList.length > 0
+  ) {
+    formData.data.serviceContractPayList.push({
+      payName: "",
+      amount: undefined,
+      remark: "",
+    });
   } else {
-    formData.data.serviceContractPayList = [{ payName: "", amount: undefined, remark: "" }];
+    formData.data.serviceContractPayList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
   }
 };
 const handleDelete = (index) => {
   formData.data.serviceContractPayList.splice(index, 1);
 };
 const querySearch = (queryString, callback) => {
-  proxy.post("/serviceContractPay/page", { payName: queryString }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      res.rows = res.rows.map((item) => {
-        return {
-          ...item,
-          value: item.payName,
-        };
-      });
-      callback(res.rows);
-    } else {
-      callback([]);
-    }
-  });
+  proxy
+    .post("/serviceContractPay/page", { payName: queryString })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        res.rows = res.rows.map((item) => {
+          return {
+            ...item,
+            value: item.payName,
+          };
+        });
+        callback(res.rows);
+      } else {
+        callback([]);
+      }
+    });
 };
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
-    if (formData.data.serviceContractProductList && formData.data.serviceContractProductList.length > 0) {
+    if (
+      formData.data.serviceContractProductList &&
+      formData.data.serviceContractProductList.length > 0
+    ) {
       return true;
     } else {
       ElMessage("请添加至少一件商品");

+ 85 - 16
src/views/customer/highseas/index.vue

@@ -14,7 +14,8 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #address="{ item }">
           <span>{{ item.countryName }}</span>
           <span v-if="item.provinceName"> ,{{ item.provinceName }}</span>
@@ -23,28 +24,62 @@
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="800" v-loading="loadingOperation">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="loadingOperation"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #address>
           <el-row :gutter="10" style="width: 100%; margin-left: -15px">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                <el-select
+                  v-model="formData.data.countryId"
+                  placeholder="国家"
+                  @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>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceId">
-                <el-select v-model="formData.data.provinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
-                  <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                <el-select
+                  v-model="formData.data.provinceId"
+                  placeholder="省/洲"
+                  @change="(val) => getCityData(val, '30', true)"
+                >
+                  <el-option
+                    v-for="item in provinceData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityId">
                 <el-select v-model="formData.data.cityId" placeholder="城市">
-                  <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                  <el-option
+                    v-for="item in cityData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -52,7 +87,8 @@
           <el-row style="margin-top: 20px; width: 100%; margin-left: -10px">
             <el-col :span="24">
               <el-form-item prop="address">
-                <el-input v-model="formData.data.address" type="textarea"> </el-input>
+                <el-input v-model="formData.data.address" type="textarea">
+                </el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -61,21 +97,48 @@
         <template #person>
           <div>
             <el-button type="primary" @click="clickAddPerson"> 添加 </el-button>
-            <byTable :source="formData.data.customerUserList" :config="configPerson" hideSearch hidePagination> </byTable>
+            <byTable
+              :source="formData.data.customerUserList"
+              :config="configPerson"
+              hideSearch
+              hidePagination
+            >
+            </byTable>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm('submit')" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('submit')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="添加联系人" v-model="openPerson" width="400" v-loading="openPerson">
-      <byForm :formConfig="formConfigPerson" :formOption="formOption" v-model="formPerson.data" :rules="rulesPerson" ref="person"> </byForm>
+    <el-dialog
+      title="添加联系人"
+      v-model="openPerson"
+      width="400"
+      v-loading="openPerson"
+    >
+      <byForm
+        :formConfig="formConfigPerson"
+        :formOption="formOption"
+        v-model="formPerson.data"
+        :rules="rulesPerson"
+        ref="person"
+      >
+      </byForm>
       <template #footer>
         <el-button @click="openPerson = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPerson('person')" size="large"> 确 定 </el-button>
+        <el-button type="primary" @click="submitPerson('person')" size="large">
+          确 定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -439,7 +502,10 @@ const clickAddPerson = () => {
 };
 const submitPerson = () => {
   person.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       formData.data.customerUserList.push({
         name: formPerson.data.name,
         phone: formPerson.data.phone,
@@ -457,7 +523,10 @@ const submitPerson = () => {
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
         () => {

+ 107 - 30
src/views/customer/privatesea/index.vue

@@ -14,7 +14,8 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #address="{ item }">
           <span>{{ item.countryName }}</span>
           <span v-if="item.provinceName"> ,{{ item.provinceName }}</span>
@@ -23,28 +24,62 @@
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="800" v-loading="loadingOperation">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="loadingOperation"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #address>
           <el-row :gutter="10" style="width: 100%; margin-left: -15px">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
+                <el-select
+                  v-model="formData.data.countryId"
+                  placeholder="国家"
+                  @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>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="provinceId">
-                <el-select v-model="formData.data.provinceId" placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
-                  <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
+                <el-select
+                  v-model="formData.data.provinceId"
+                  placeholder="省/洲"
+                  @change="(val) => getCityData(val, '30', true)"
+                >
+                  <el-option
+                    v-for="item in provinceData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityId">
                 <el-select v-model="formData.data.cityId" placeholder="城市">
-                  <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
+                  <el-option
+                    v-for="item in cityData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -52,7 +87,8 @@
           <el-row style="margin-top: 20px; width: 100%; margin-left: -10px">
             <el-col :span="24">
               <el-form-item prop="address">
-                <el-input v-model="formData.data.address" type="textarea"> </el-input>
+                <el-input v-model="formData.data.address" type="textarea">
+                </el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -61,21 +97,48 @@
         <template #person>
           <div>
             <el-button type="primary" @click="clickAddPerson"> 添加 </el-button>
-            <byTable :source="formData.data.customerUserList" :config="configPerson" hideSearch hidePagination> </byTable>
+            <byTable
+              :source="formData.data.customerUserList"
+              :config="configPerson"
+              hideSearch
+              hidePagination
+            >
+            </byTable>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm('submit')" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('submit')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="添加联系人" v-model="openPerson" width="400" v-loading="openPerson">
-      <byForm :formConfig="formConfigPerson" :formOption="formOption" v-model="formPerson.data" :rules="rulesPerson" ref="person"> </byForm>
+    <el-dialog
+      title="添加联系人"
+      v-model="openPerson"
+      width="400"
+      v-loading="openPerson"
+    >
+      <byForm
+        :formConfig="formConfigPerson"
+        :formOption="formOption"
+        v-model="formPerson.data"
+        :rules="rulesPerson"
+        ref="person"
+      >
+      </byForm>
       <template #footer>
         <el-button @click="openPerson = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPerson('person')" size="large"> 确 定 </el-button>
+        <el-button type="primary" @click="submitPerson('person')" size="large">
+          确 定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -394,13 +457,15 @@ const person = ref(null);
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/customer/privateSeaPage", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/customer/privateSeaPage", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const openModal = () => {
   modalType.value = "add";
@@ -457,7 +522,10 @@ const clickAddPerson = () => {
 };
 const submitPerson = () => {
   person.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       formData.data.customerUserList.push({
         name: formPerson.data.name,
         phone: formPerson.data.phone,
@@ -475,7 +543,10 @@ const submitPerson = () => {
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+    if (
+      formData.data.customerUserList &&
+      formData.data.customerUserList.length > 0
+    ) {
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
         () => {
@@ -528,14 +599,20 @@ const getDict = () => {
         };
       });
     });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    userList.value = res.rows.map((item) => {
-      return {
-        label: item.nickName,
-        value: item.userId,
-      };
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
     });
-  });
 };
 getDict();
 getList();

+ 87 - 27
src/views/finance/fundManage/account/index.vue

@@ -13,28 +13,62 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加账户' : '编辑账户'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加账户' : '编辑账户'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #balance>
           <div style="width: 100%">
             <el-button type="primary" @click="clickBalance">添加</el-button>
-            <el-table :data="formData.data.accountRemainderList" style="width: 100%; margin-top: 16px">
+            <el-table
+              :data="formData.data.accountRemainderList"
+              style="width: 100%; margin-top: 16px"
+            >
               <el-table-column label="币种">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'accountRemainderList.' + $index + '.currency'" :rules="rules.currency" :inline-message="true">
-                    <el-select v-model="row.currency" placeholder="请选择币种" style="width: 100%" :disabled="row.id">
-                      <el-option v-for="item in accountCurrency" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                  <el-form-item
+                    :prop="'accountRemainderList.' + $index + '.currency'"
+                    :rules="rules.currency"
+                    :inline-message="true"
+                  >
+                    <el-select
+                      v-model="row.currency"
+                      placeholder="请选择币种"
+                      style="width: 100%"
+                      :disabled="row.id"
+                    >
+                      <el-option
+                        v-for="item in accountCurrency"
+                        :key="item.dictKey"
+                        :label="item.dictValue"
+                        :value="item.dictKey"
+                      />
                     </el-select>
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column label="余额">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'accountRemainderList.' + $index + '.remainder'" :rules="rules.remainder" :inline-message="true">
+                  <el-form-item
+                    :prop="'accountRemainderList.' + $index + '.remainder'"
+                    :rules="rules.remainder"
+                    :inline-message="true"
+                  >
                     <el-input-number
                       v-model="row.remainder"
                       placeholder="请输入余额"
@@ -42,13 +76,20 @@
                       :precision="2"
                       :controls="false"
                       :min="0"
-                      :disabled="row.id" />
+                      :disabled="row.id"
+                    />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column label="操作" width="80">
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="handleRemove($index)" v-if="!row.id">删除</el-button>
+                  <el-button
+                    type="primary"
+                    link
+                    @click="handleRemove($index)"
+                    v-if="!row.id"
+                    >删除</el-button
+                  >
                 </template>
               </el-table-column>
             </el-table>
@@ -57,7 +98,9 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -141,11 +184,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/accountManagement/delete", {
                     id: row.id,
@@ -182,13 +229,15 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/accountManagement/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/accountManagement/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -273,10 +322,18 @@ const openModal = (val) => {
   dialogVisible.value = true;
 };
 const clickBalance = () => {
-  if (formData.data.accountRemainderList && formData.data.accountRemainderList.length > 0) {
-    formData.data.accountRemainderList.push({ currency: "", remainder: undefined });
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
   } else {
-    formData.data.accountRemainderList = [{ currency: "", remainder: undefined }];
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
   }
 };
 const handleRemove = (index) => {
@@ -292,7 +349,10 @@ const isRepeat = (arr) => {
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (formData.data.accountRemainderList && formData.data.accountRemainderList.length > 0) {
+    if (
+      formData.data.accountRemainderList &&
+      formData.data.accountRemainderList.length > 0
+    ) {
       if (isRepeat(formData.data.accountRemainderList)) {
         return ElMessage("请勿重复添加货币余额");
       } else {

+ 109 - 39
src/views/finance/fundManage/flow/index.vue

@@ -14,9 +14,12 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
-          <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
+          <div
+            :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')"
+          >
             <span style="padding-right: 4px">{{ item.currency }}</span>
             <span v-if="item.status === '20'">-</span>
             <span>{{ moneyFormat(item.amount, 2) }}</span>
@@ -25,11 +28,28 @@
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加流水' : '编辑流水'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #transactionTime>
           <div>
-            <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
+            <el-date-picker
+              v-model="formData.data.transactionTime"
+              type="datetime"
+              placeholder="请选择交易时间"
+              value-format="YYYY-MM-DD HH:mm:ss"
+            />
           </div>
         </template>
         <template #money>
@@ -37,21 +57,47 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select v-model="formData.data.status" placeholder="请选择收支类型" style="width: 100%" @change="changeStatus()">
-                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formData.data.status"
+                    placeholder="请选择收支类型"
+                    style="width: 100%"
+                    @change="changeStatus()"
+                  >
+                    <el-option
+                      v-for="item in status"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select v-model="formData.data.currency" placeholder="请选择币种" style="width: 100%">
-                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formData.data.currency"
+                    placeholder="请选择币种"
+                    style="width: 100%"
+                  >
+                    <el-option
+                      v-for="item in accountCurrency"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="amount">
-                  <el-input-number v-model="formData.data.amount" placeholder="请输入金额" style="width: 100%" :precision="2" :controls="false" :min="0" />
+                  <el-input-number
+                    v-model="formData.data.amount"
+                    placeholder="请输入金额"
+                    style="width: 100%"
+                    :precision="2"
+                    :controls="false"
+                    :min="0"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -61,7 +107,13 @@
           <div>
             <el-form-item prop="received">
               <el-radio-group v-model="formData.data.received">
-                <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
+                <el-radio
+                  v-for="item in received"
+                  :key="item.value"
+                  :label="item.value"
+                  border
+                  >{{ item.label }}</el-radio
+                >
               </el-radio-group>
             </el-form-item>
           </div>
@@ -69,7 +121,9 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -215,11 +269,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/accountRunningWater/delete", {
                     id: row.id,
@@ -257,27 +315,31 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      accountList.value = res.rows.map((item) => {
-        return {
-          label: item.alias,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountList.value = res.rows.map((item) => {
+          return {
+            label: item.alias,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/accountRunningWater/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/accountRunningWater/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -361,20 +423,28 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
-  transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
+  accountManagementId: [
+    { required: true, message: "请选择账户", trigger: "change" },
+  ],
+  transactionTime: [
+    { required: true, message: "请选择交易时间", trigger: "change" },
+  ],
   status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
+  received: [
+    { required: true, message: "请选择合同是否到账", trigger: "change" },
+  ],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
   name: [{ required: true, message: "请输入账户名称", trigger: "blur" }],
   openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
-  accountOpening: [{ required: true, message: "请输入银行账号", trigger: "blur" }],
+  accountOpening: [
+    { required: true, message: "请输入银行账号", trigger: "blur" },
+  ],
 });
 const openModal = (val) => {
   modalType.value = val;
   formData.data = {
-    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss")
+    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
   };
   loadingDialog.value = false;
   dialogVisible.value = true;

+ 77 - 24
src/views/oa/work/task/index.vue

@@ -14,7 +14,8 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #title="{ item }">
           <div>
             <span style="color: #409eff">{{ item.title }}</span>
@@ -22,31 +23,64 @@
         </template>
         <template #file="{ item }">
           <div>
-            <span style="color: #409eff; cursor: pointer" @click="clickFile(item.id)">{{ item.fileName }}</span>
+            <span
+              style="color: #409eff; cursor: pointer"
+              @click="clickFile(item.id)"
+              >{{ item.fileName }}</span
+            >
           </div>
         </template>
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加任务' : '编辑任务'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加任务' : '编辑任务'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #importanceLv>
           <div>
             <el-radio-group v-model="formData.data.importanceLv">
-              <el-radio v-for="item in importanceLv" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
+              <el-radio
+                v-for="item in importanceLv"
+                :key="item.value"
+                :label="item.value"
+                border
+                >{{ item.label }}</el-radio
+              >
             </el-radio-group>
           </div>
         </template>
         <template #urgencyLv>
           <div>
             <el-radio-group v-model="formData.data.urgencyLv">
-              <el-radio v-for="item in urgencyLv" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
+              <el-radio
+                v-for="item in urgencyLv"
+                :key="item.value"
+                :label="item.value"
+                border
+                >{{ item.label }}</el-radio
+              >
             </el-radio-group>
           </div>
         </template>
         <template #dueDate>
           <div>
-            <el-date-picker v-model="formData.data.dueDate" type="date" placeholder="请选择完成期限" value-format="YYYY-MM-DD" />
+            <el-date-picker
+              v-model="formData.data.dueDate"
+              type="date"
+              placeholder="请选择完成期限"
+              value-format="YYYY-MM-DD"
+            />
           </div>
         </template>
         <template #fileList>
@@ -57,7 +91,8 @@
               :data="uploadData"
               :limit="1"
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -65,7 +100,9 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -281,11 +318,15 @@ const config = computed(() => {
                 },
                 el: "button",
                 click() {
-                  ElMessageBox.confirm("此操作将永久取消该数据, 是否继续?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
+                  ElMessageBox.confirm(
+                    "此操作将永久取消该数据, 是否继续?",
+                    "提示",
+                    {
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
                     proxy
                       .post("/workTasks/delete", {
                         id: row.id,
@@ -324,14 +365,20 @@ const getDict = () => {
         });
       }
     });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    userList.value = res.rows.map((item) => {
-      return {
-        label: item.nickName,
-        value: item.userId,
-      };
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
     });
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -404,10 +451,16 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   title: [{ required: true, message: "请输入任务标题", trigger: "blur" }],
-  importanceLv: [{ required: true, message: "请选择重要程度", trigger: "change" }],
+  importanceLv: [
+    { required: true, message: "请选择重要程度", trigger: "change" },
+  ],
   urgencyLv: [{ required: true, message: "请选择紧急程度", trigger: "change" }],
-  dueDate: [{ required: true, message: "请选择完成期限", trigger: ["change", "blur"] }],
-  personLiableId: [{ required: true, message: "请选择负责人", trigger: "change" }],
+  dueDate: [
+    { required: true, message: "请选择完成期限", trigger: ["change", "blur"] },
+  ],
+  personLiableId: [
+    { required: true, message: "请选择负责人", trigger: "change" },
+  ],
 });
 const fileList = ref([]);
 const uploadData = ref({});

+ 28 - 9
src/views/publicModule/documentary/index.vue

@@ -14,12 +14,25 @@
             action: () => openModal(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加节点' : '编辑节点'" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加节点' : '编辑节点'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="500"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <!-- <template #balance>
             <div style="width: 100%">
               <el-button type="primary" @click="clickBalance">添加</el-button>
@@ -28,7 +41,9 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -147,11 +162,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/documentary/delete", {
                     id: row.id,

+ 93 - 38
src/views/purchaseManage/purchasePayment/invoice/index.vue

@@ -14,15 +14,34 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加发票' : '编辑发票'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加发票' : '编辑发票'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #money>
           <div style="width: 100%">
-            <el-input-number v-model="formData.data.money" placeholder="请输入开票金额" :precision="2" :controls="false" :min="0" />
+            <el-input-number
+              v-model="formData.data.money"
+              placeholder="请输入开票金额"
+              :precision="2"
+              :controls="false"
+              :min="0"
+            />
           </div>
         </template>
         <template #file>
@@ -33,20 +52,39 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>上传文件</el-button>
             </el-upload>
           </div>
         </template>
         <template #information>
-          <el-table :data="formData.data.invoiceDetailsList" style="width: 100%; margin-top: 16px">
+          <el-table
+            :data="formData.data.invoiceDetailsList"
+            style="width: 100%; margin-top: 16px"
+          >
             <el-table-column prop="code" label="采购合同" width="140" />
             <el-table-column prop="amount" label="合同金额" width="120" />
-            <el-table-column prop="sumInvoiceMoney" label="已收发票金额" width="120" />
+            <el-table-column
+              prop="sumInvoiceMoney"
+              label="已收发票金额"
+              width="120"
+            />
             <el-table-column label="关联金额">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'invoiceDetailsList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
-                  <el-input-number v-model="row.money" placeholder="请输入关联金额" style="width: 100%" :precision="2" :controls="false" :min="0" />
+                <el-form-item
+                  :prop="'invoiceDetailsList.' + $index + '.money'"
+                  :rules="rules.money"
+                  :inline-message="true"
+                >
+                  <el-input-number
+                    v-model="row.money"
+                    placeholder="请输入关联金额"
+                    style="width: 100%"
+                    :precision="2"
+                    :controls="false"
+                    :min="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -55,7 +93,9 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -157,11 +197,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/invoice/delete", {
                     id: row.id,
@@ -199,16 +243,18 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      supplierList.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        supplierList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -335,12 +381,19 @@ const submitForm = () => {
         };
       });
     }
-    if (!(formData.data.invoiceDetailsList && formData.data.invoiceDetailsList.length > 0)) {
+    if (
+      !(
+        formData.data.invoiceDetailsList &&
+        formData.data.invoiceDetailsList.length > 0
+      )
+    ) {
       return ElMessage("该供应商暂无关联合同");
     }
     let money = 0;
     for (let i = 0; i < formData.data.invoiceDetailsList.length; i++) {
-      money = parseFloat(Number(money) + Number(formData.data.invoiceDetailsList[i].money)).toFixed(2);
+      money = parseFloat(
+        Number(money) + Number(formData.data.invoiceDetailsList[i].money)
+      ).toFixed(2);
     }
     if (money != formData.data.money) {
       return ElMessage("开票金额不等于关联金额");
@@ -367,17 +420,19 @@ const update = (row) => {
   modalType.value = "edit";
   loadingDialog.value = true;
   proxy.post("/invoice/detail", { id: row.id }).then((res) => {
-    proxy.post("/fileInfo/getList", { businessIdList: [row.id] }).then((res) => {
-      if (res[row.id] && res[row.id].length > 0) {
-        fileList.value = res[row.id].map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [row.id] })
+      .then((res) => {
+        if (res[row.id] && res[row.id].length > 0) {
+          fileList.value = res[row.id].map((item) => {
+            return {
+              raw: item,
+              name: item.fileName,
+              url: item.fileUrl,
+            };
+          });
+        }
+      });
     res.invoiceDetailsList = res.invoiceDetailsVoList.map((item) => {
       return {
         code: item.purchaseCode,

+ 14 - 9
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -14,7 +14,8 @@
             action: () => purchasePayment(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div>
             <span>{{ moneyFormat(item.amount, 2) }}</span>
@@ -114,7 +115,9 @@ const config = computed(() => {
       render(type) {
         let text = "";
         if (fundsPaymentMethod.value && fundsPaymentMethod.value.length > 0) {
-          let data = fundsPaymentMethod.value.filter((item) => item.value == type);
+          let data = fundsPaymentMethod.value.filter(
+            (item) => item.value == type
+          );
           if (data && data.length > 0) {
             text = data[0].label;
           }
@@ -246,14 +249,16 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };

+ 46 - 18
src/views/purchaseManage/purchasePayment/refund/index.vue

@@ -14,7 +14,8 @@
             action: () => applyForRefund(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div style="color: #409eff">{{ moneyFormat(item.amount, 2) }}</div>
         </template>
@@ -24,17 +25,38 @@
       </byTable>
     </div>
 
-    <el-dialog title="到款登记" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      title="到款登记"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #receiptAmount>
           <div style="width: 100%">
-            <el-input-number v-model="formData.data.receiptAmount" placeholder="请输入到款金额" :min="0" :precision="2" :controls="false" style="width: 100%" />
+            <el-input-number
+              v-model="formData.data.receiptAmount"
+              placeholder="请输入到款金额"
+              :min="0"
+              :precision="2"
+              :controls="false"
+              style="width: 100%"
+            />
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -206,18 +228,20 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        bankName: item.name,
-        accountOpening: item.accountOpening,
-        openingBank: item.openingBank,
-        interbankNumber: item.interbankNumber,
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          bankName: item.name,
+          accountOpening: item.accountOpening,
+          openingBank: item.openingBank,
+          interbankNumber: item.interbankNumber,
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -307,8 +331,12 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  receiptAccountManagementId: [{ required: true, message: "请选择到款账户", trigger: "change" }],
-  receiptAmount: [{ required: true, message: "请输入到款金额", trigger: "blur" }],
+  receiptAccountManagementId: [
+    { required: true, message: "请选择到款账户", trigger: "change" },
+  ],
+  receiptAmount: [
+    { required: true, message: "请输入到款金额", trigger: "blur" },
+  ],
 });
 const formData = reactive({
   data: {},

+ 254 - 52
src/views/salesMange/saleContract/contract/index.vue

@@ -14,7 +14,8 @@
             action: () => newContract(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -36,12 +37,30 @@
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
-      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
-        <div style="font-size: 18px; text-align: center">{{ printDetails.sellCorporationNameEn }}</div>
+      <div
+        id="pdfDom"
+        style="width: 800px; padding: 16px; font-size: 12px !important"
+      >
+        <div style="font-size: 18px; text-align: center">
+          {{ printDetails.sellCorporationNameEn }}
+        </div>
         <div style="text-align: center">
-          {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+          {{ printDetails.sellCountryName }},{{
+            printDetails.sellProvinceName
+          }},{{ printDetails.sellCityName }},{{
+            printDetails.sellDetailedAddress
+          }}
+        </div>
+        <div
+          style="
+            font-size: 14px;
+            color: #409eff;
+            text-align: center;
+            padding-top: 16px;
+          "
+        >
+          PROFORMA INVOICE
         </div>
-        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
         <div style="padding-top: 8px">
           <div>PI NO. : {{ printDetails.contractCode }}</div>
           <div>PI DATE: {{ printDetails.createTimeEn }}</div>
@@ -51,27 +70,55 @@
             <div style="color: #409eff">VENDOR:</div>
             <div>{{ printDetails.sellCorporationNameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+              {{ printDetails.sellCountryName }},{{
+                printDetails.sellProvinceName
+              }},{{ printDetails.sellCityName }},{{
+                printDetails.sellDetailedAddress
+              }}
+            </div>
+            <div>
+              {{ printDetails.sellContactName }},{{
+                printDetails.sellContactNumber
+              }}
             </div>
-            <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
           </div>
           <div style="width: 50%">
             <div style="color: #409eff">BUYER:</div>
             <div>{{ printDetails.buyCorporationName }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyDetailedAddress }}
+              {{ printDetails.buyCountryName }},{{
+                printDetails.buyProvinceName
+              }},{{ printDetails.buyCityName }},{{
+                printDetails.buyDetailedAddress
+              }}
+            </div>
+            <div>
+              {{ printDetails.buyContactName }},{{
+                printDetails.buyContactNumber
+              }}
             </div>
-            <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
           </div>
         </div>
         <div style="height: 16px"></div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
               <div>{{ printDetails.sellCountryName }}</div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
               <div>{{ printDetails.buyCountryName }}</div>
             </div>
@@ -81,17 +128,37 @@
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">TERMS OF DELIVERY:</div>
-              <div>{{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}</div>
+              <div>
+                {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
+              </div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">CURRENCY:</div>
-              <div>{{ dictValueLabel(printDetails.currency, accountCurrency) }}</div>
+              <div>
+                {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+              </div>
             </div>
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="color: #409eff">EXPORT BY/VIA:</div>
-              <div>{{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}</div>
+              <div>
+                {{
+                  dictValueLabel(printDetails.transportMethod, shippingMethod)
+                }}
+              </div>
             </div>
           </div>
           <div style="display: flex; width: 100%">
@@ -107,29 +174,84 @@
         </div>
         <div style="height: 16px"></div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
-          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
-          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
-          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+          <div class="contentRow" style="width: 50px; text-align: center">
+            NO.
+          </div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 450px); text-align: center"
+          >
+            COMMODITY, SPECIFICATION
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            QUANTITY
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT PRICE
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            TOTAL PRICE
+          </div>
         </div>
-        <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
-          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
-            <div class="contentRow" style="width: 50px; text-align: center">{{ index + 1 }}</div>
-            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">{{ item.productName }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.productUnit }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.productQuantity }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.productPrice }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
+        <div
+          v-if="
+            printDetails.productInfoList &&
+            printDetails.productInfoList.length > 0
+          "
+        >
+          <div
+            class="baseRow"
+            style="display: flex"
+            v-for="(item, index) in printDetails.productInfoList"
+            :key="item.productId"
+          >
+            <div class="contentRow" style="width: 50px; text-align: center">
+              {{ index + 1 }}
+            </div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
+              {{ item.productName }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productUnit }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productQuantity }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productPrice }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
           </div>
         </div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("productQuantity", 0) }}</div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 400px); text-align: center"
+          >
+            SUBTOTAL:
+          </div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("productQuantity", 0) }}
+          </div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
         </div>
         <!-- <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
           <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
@@ -138,11 +260,28 @@
           </div>
         </div> -->
         <div class="baseRow" style="display: flex">
-          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 100px); text-align: right; color: #409eff"
+          >
+            TOTAL PRICE:
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
         </div>
-        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
-          <div class="contentRow" style="width: 100%">{{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}</div>
+        <div
+          class="baseRow"
+          style="display: flex; border-bottom: 1px solid black"
+        >
+          <div class="contentRow" style="width: 100%">
+            {{
+              translateIntoEnglish(
+                printDetails.totalAmount,
+                printDetails.currency
+              )
+            }}
+          </div>
         </div>
         <div style="height: 16px"></div>
         <div class="baseRow" style="color: #409eff">
@@ -150,12 +289,66 @@
         </div>
         <div class="baseRow" style="border-bottom: 1px solid black">
           <div class="contentRow" style="width: 100%">
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Name: {{}}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank: {{}}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank Address: {{}}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Account Number: {{}}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{}}</div>
-            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Address: {{}}</div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Name: {{}}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Bank: {{}}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Bank Address: {{}}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Account Number: {{}}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Swift Code: {{}}
+            </div>
+            <div
+              style="
+                line-height: 24px;
+                padding-left: 4px;
+                word-break: break-all;
+                word-wrap: break-word;
+              "
+            >
+              Beneficiary Address: {{}}
+            </div>
           </div>
         </div>
         <div style="height: 32px"></div>
@@ -172,7 +365,9 @@
       </div>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -398,11 +593,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/contract/edit", {
                     id: row.id,
@@ -549,7 +748,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
+  if (
+    printDetails.value.productInfoList &&
+    printDetails.value.productInfoList.length > 0
+  ) {
     printDetails.value.productInfoList.map((item) => {
       console.log(item, label, item[label]);
       if (item[label]) {

+ 247 - 58
src/views/salesMange/saleContract/priceSheet/index.vue

@@ -14,7 +14,8 @@
             action: () => newPriceSheet(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -30,45 +31,101 @@
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
-      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
-        <div style="font-size: 18px; text-align: center">{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
+      <div
+        id="pdfDom"
+        style="width: 800px; padding: 16px; font-size: 12px !important"
+      >
+        <div style="font-size: 18px; text-align: center">
+          {{
+            getLabel(printDetails.sellCorporationId, corporationList, "nameEn")
+          }}
+        </div>
         <div style="text-align: center">
-          {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
+          {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{
+            printDetails.sellCityId
+          }},{{ printDetails.sellAddress }}
+        </div>
+        <div
+          style="
+            font-size: 14px;
+            color: #409eff;
+            text-align: center;
+            padding-top: 16px;
+          "
+        >
+          QUOTATION
         </div>
-        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">QUOTATION</div>
         <div style="padding-top: 8px">
           <div>Reference NO. : {{ printDetails.code }}</div>
           <div style="display: flex">
-            <div style="width: 50%">DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}</div>
+            <div style="width: 50%">
+              DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}
+            </div>
             <div style="width: 50%">Valid Date:</div>
           </div>
         </div>
         <div style="border: 1px solid black; display: flex">
           <div style="width: 50%; border-right: 1px solid black">
             <div style="color: #409eff">VENDOR:</div>
-            <div>{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
+            <div>
+              {{
+                getLabel(
+                  printDetails.sellCorporationId,
+                  corporationList,
+                  "nameEn"
+                )
+              }}
+            </div>
             <div style="padding: 16px 0">
-              {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
+              {{ printDetails.sellCountryId }},{{
+                printDetails.sellProvinceId
+              }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
+            </div>
+            <div>
+              {{ printDetails.sellContactName }},{{
+                printDetails.sellContactNumber
+              }}
             </div>
-            <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
           </div>
           <div style="width: 50%">
             <div style="color: #409eff">BUYER:</div>
-            <div>{{ getLabel(printDetails.buyCorporationId, customerList, "name") }}</div>
+            <div>
+              {{
+                getLabel(printDetails.buyCorporationId, customerList, "name")
+              }}
+            </div>
             <div style="padding: 16px 0">
-              {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+              {{ printDetails.buyCountryName }},{{
+                printDetails.buyProvinceName
+              }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+            </div>
+            <div>
+              {{ printDetails.buyContactName }},{{
+                printDetails.buyContactNumber
+              }}
             </div>
-            <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
           </div>
         </div>
         <div style="height: 16px"></div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
               <div>{{ printDetails.sellCountryId }}</div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
               <div>{{ printDetails.buyCountryName }}</div>
             </div>
@@ -78,17 +135,37 @@
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">TERMS OF DELIVERY:</div>
-              <div>{{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}</div>
+              <div>
+                {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
+              </div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">CURRENCY:</div>
-              <div>{{ dictValueLabel(printDetails.currency, accountCurrency) }}</div>
+              <div>
+                {{ dictValueLabel(printDetails.currency, accountCurrency) }}
+              </div>
             </div>
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="color: #409eff">EXPORT BY/VIA:</div>
-              <div>{{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}</div>
+              <div>
+                {{
+                  dictValueLabel(printDetails.transportMethod, shippingMethod)
+                }}
+              </div>
             </div>
           </div>
           <div style="display: flex; width: 100%">
@@ -103,42 +180,132 @@
         </div>
         <div style="height: 16px"></div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
-          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
-          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
-          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+          <div class="contentRow" style="width: 50px; text-align: center">
+            NO.
+          </div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 450px); text-align: center"
+          >
+            COMMODITY, SPECIFICATION
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            QUANTITY
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT PRICE
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            TOTAL PRICE
+          </div>
         </div>
-        <div v-if="printDetails.quotationProductList && printDetails.quotationProductList.length > 0">
-          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationProductList" :key="item.productId">
-            <div class="contentRow" style="width: 50px; text-align: center">{{ index + 1 }}</div>
-            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">{{ item.productName }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.productUnit }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.quantity }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.price }}</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
+        <div
+          v-if="
+            printDetails.quotationProductList &&
+            printDetails.quotationProductList.length > 0
+          "
+        >
+          <div
+            class="baseRow"
+            style="display: flex"
+            v-for="(item, index) in printDetails.quotationProductList"
+            :key="item.productId"
+          >
+            <div class="contentRow" style="width: 50px; text-align: center">
+              {{ index + 1 }}
+            </div>
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
+              {{ item.productName }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.productUnit }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.quantity }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.price }}
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
           </div>
         </div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("quantity", 0) }}</div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 400px); text-align: center"
+          >
+            SUBTOTAL:
+          </div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("quantity", 0) }}
+          </div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ statistics("amount", 2) }}
+          </div>
         </div>
-        <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
-          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
-            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
-            <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
+        <div
+          v-if="
+            printDetails.quotationPayList &&
+            printDetails.quotationPayList.length > 0
+          "
+        >
+          <div
+            class="baseRow"
+            style="display: flex"
+            v-for="(item, index) in printDetails.quotationPayList"
+            :key="index"
+          >
+            <div
+              class="contentRow"
+              style="
+                width: calc(100% - 100px);
+                text-align: right;
+                color: #409eff;
+              "
+            >
+              {{ item.payName }}:
+            </div>
+            <div class="contentRow" style="width: 100px; text-align: center">
+              {{ item.amount }}
+            </div>
           </div>
         </div>
         <div class="baseRow" style="display: flex">
-          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
-          <div class="contentRow" style="width: 100px; text-align: center">{{ getAllMoney(statistics("amount", 2)) }}</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 100px); text-align: right; color: #409eff"
+          >
+            TOTAL PRICE:
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            {{ getAllMoney(statistics("amount", 2)) }}
+          </div>
         </div>
-        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
-          <div class="contentRow" style="width: 100%">{{ translateIntoEnglish(printDetails.amount, printDetails.currency) }}</div>
+        <div
+          class="baseRow"
+          style="display: flex; border-bottom: 1px solid black"
+        >
+          <div class="contentRow" style="width: 100%">
+            {{
+              translateIntoEnglish(printDetails.amount, printDetails.currency)
+            }}
+          </div>
         </div>
         <!-- <div style="height: 16px"></div>
         <div class="baseRow" style="color: #409eff">
@@ -158,17 +325,31 @@
         <div style="display: flex">
           <div style="width: 50%">
             <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
-            <div>{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
+            <div>
+              {{
+                getLabel(
+                  printDetails.sellCorporationId,
+                  corporationList,
+                  "nameEn"
+                )
+              }}
+            </div>
           </div>
           <div style="width: 50%">
             <div style="color: #409eff">CONFIRMED BY BUYER:</div>
-            <div>{{ getLabel(printDetails.buyCorporationId, customerList, "name") }}</div>
+            <div>
+              {{
+                getLabel(printDetails.buyCorporationId, customerList, "name")
+              }}
+            </div>
           </div>
         </div>
       </div>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -360,14 +541,16 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.post("/saleQuotation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/saleQuotation/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -486,7 +669,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.quotationProductList && printDetails.value.quotationProductList.length > 0) {
+  if (
+    printDetails.value.quotationProductList &&
+    printDetails.value.quotationProductList.length > 0
+  ) {
     printDetails.value.quotationProductList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -507,7 +693,10 @@ const getLabel = (key, list, label) => {
 };
 const getAllMoney = (num) => {
   let money = num;
-  if (printDetails.value.quotationPayList && printDetails.value.quotationPayList.length > 0) {
+  if (
+    printDetails.value.quotationPayList &&
+    printDetails.value.quotationPayList.length > 0
+  ) {
     printDetails.value.quotationPayList.map((item) => {
       if (item.amount) {
         money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);

+ 157 - 49
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -16,12 +16,16 @@
             action: () => openModal(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div></div>
         </template>
       </byTable>
-      <div style="padding: 0 20px 20px 20px; background-color: white" v-if="rateStatus">
+      <div
+        style="padding: 0 20px 20px 20px; background-color: white"
+        v-if="rateStatus"
+      >
         <el-table v-loading="loading" :data="sourceList.data">
           <el-table-column label="合同编号">
             <el-table-column label="" prop="contractCode" width="160" />
@@ -36,7 +40,11 @@
             <el-table-column label="" prop="contractAmount" width="120" />
           </el-table-column>
           <el-table-column label="收入">
-            <el-table-column label="合同到账" prop="contractArrival" width="120" />
+            <el-table-column
+              label="合同到账"
+              prop="contractArrival"
+              width="120"
+            />
             <el-table-column label="其他收入" prop="otherIncome" width="120" />
           </el-table-column>
           <el-table-column label="采购合同金额">
@@ -44,20 +52,51 @@
           </el-table-column>
           <el-table-column label="支出">
             <el-table-column label="支付货款" prop="payForGoods" width="120" />
-            <el-table-column label="其他支出" prop="otherExpenses" width="120" />
+            <el-table-column
+              label="其他支出"
+              prop="otherExpenses"
+              width="120"
+            />
           </el-table-column>
           <el-table-column label="统计">
             <el-table-column label="收入合计" prop="totalIncome" width="120" />
-            <el-table-column label="支出合计" prop="totalExpenses" width="120" />
+            <el-table-column
+              label="支出合计"
+              prop="totalExpenses"
+              width="120"
+            />
             <el-table-column label="毛利" prop="grossProfit" width="120" />
-            <el-table-column label="毛利率" prop="grossProfitMargin" width="120" />
+            <el-table-column
+              label="毛利率"
+              prop="grossProfitMargin"
+              width="120"
+            />
           </el-table-column>
-          <el-table-column label="操作" align="center" width="170" fixed="right">
+          <el-table-column
+            label="操作"
+            align="center"
+            width="170"
+            fixed="right"
+          >
             <template #default="{ row }">
               <div>
-                <el-button type="primary" @click="changeExchangeRate(row)" link>调整汇率</el-button>
-                <el-button type="primary" @click="clickSettlement(row)" v-if="row.settlementStatus === 0" link>结算</el-button>
-                <el-button type="primary" @click="clickCancelSettlement(row)" v-else link>取消结算</el-button>
+                <el-button type="primary" @click="changeExchangeRate(row)" link
+                  >调整汇率</el-button
+                >
+                <el-button
+                  type="primary"
+                  @click="clickSettlement(row)"
+                  v-if="row.settlementStatus === 0"
+                  link
+                  >结算</el-button
+                >
+                <el-button
+                  type="primary"
+                  @click="clickCancelSettlement(row)"
+                  v-else
+                  link
+                  >取消结算</el-button
+                >
               </div>
             </template>
           </el-table-column>
@@ -71,14 +110,30 @@
           :page-size="sourceList.pagination.pageSize"
           :total="sourceList.pagination.total"
           @size-change="handleSizeChange"
-          @current-change="handlePageChange" />
+          @current-change="handlePageChange"
+        />
       </el-row>
     </div>
 
-    <el-dialog title="默认汇率" v-if="dialogVisible" v-model="dialogVisible" width="600">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      title="默认汇率"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #currencyList>
-          <el-table :data="formData.data.list" style="width: 100%" v-loading="loadingDialog">
+          <el-table
+            :data="formData.data.list"
+            style="width: 100%"
+            v-loading="loadingDialog"
+          >
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -86,8 +141,19 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
-                  <el-input-number v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6" :controls="false" :min="0" />
+                <el-form-item
+                  :prop="'list.' + $index + '.rate'"
+                  :rules="rules.rate"
+                  :inline-message="true"
+                >
+                  <el-input-number
+                    v-model="row.rate"
+                    placeholder="请输入兑 CHY 汇率"
+                    style="width: 100%"
+                    :precision="6"
+                    :controls="false"
+                    :min="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -96,14 +162,31 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="调整汇率" v-if="openChange" v-model="openChange" width="600">
-      <byForm :formConfig="formChangeConfig" :formOption="formOption" v-model="formChangeData.data" :rules="rules" ref="change">
+    <el-dialog
+      title="调整汇率"
+      v-if="openChange"
+      v-model="openChange"
+      width="600"
+    >
+      <byForm
+        :formConfig="formChangeConfig"
+        :formOption="formOption"
+        v-model="formChangeData.data"
+        :rules="rules"
+        ref="change"
+      >
         <template #currencyList>
-          <el-table :data="formChangeData.data.list" style="width: 100%" v-loading="loadingDialog">
+          <el-table
+            :data="formChangeData.data.list"
+            style="width: 100%"
+            v-loading="loadingDialog"
+          >
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -111,8 +194,19 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
-                  <el-input-number v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6" :controls="false" :min="0" />
+                <el-form-item
+                  :prop="'list.' + $index + '.rate'"
+                  :rules="rules.rate"
+                  :inline-message="true"
+                >
+                  <el-input-number
+                    v-model="row.rate"
+                    placeholder="请输入兑 CHY 汇率"
+                    style="width: 100%"
+                    :precision="6"
+                    :controls="false"
+                    :min="0"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -121,7 +215,9 @@
       </byForm>
       <template #footer>
         <el-button @click="openChange = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitChangeForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitChangeForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -197,25 +293,33 @@ const getDict = () => {
         ElMessage("请先添加货币");
       }
     });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    userList.value = res.rows.map((item) => {
-      return {
-        label: item.nickName,
-        value: item.userId,
-      };
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
     });
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/saleStatement/getProfitSettlement", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/saleStatement/getProfitSettlement", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const rateStatus = ref(false);
 const judgeRate = () => {
@@ -439,22 +543,26 @@ const submitChangeForm = () => {
   });
 };
 const clickSettlement = (row) => {
-  proxy.post("/saleStatement/update", { id: row.contractId, settlementStatus: 1 }).then(() => {
-    ElMessage({
-      message: "保存成功",
-      type: "success",
+  proxy
+    .post("/saleStatement/update", { id: row.contractId, settlementStatus: 1 })
+    .then(() => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      getList();
     });
-    getList();
-  });
 };
 const clickCancelSettlement = (row) => {
-  proxy.post("/saleStatement/update", { id: row.contractId, settlementStatus: 0 }).then(() => {
-    ElMessage({
-      message: "保存成功",
-      type: "success",
+  proxy
+    .post("/saleStatement/update", { id: row.contractId, settlementStatus: 0 })
+    .then(() => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      getList();
     });
-    getList();
-  });
 };
 </script>
 

+ 388 - 97
src/views/salesMange/shipmentMange/document/index.vue

@@ -13,33 +13,68 @@
             action: () => openModal(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #acceptCode="{ item }">
           <div>
-            <div style="color: #409eff" v-if="item.acceptCode">{{ item.acceptCarriage }} ({{ item.acceptCode }})</div>
+            <div style="color: #409eff" v-if="item.acceptCode">
+              {{ item.acceptCarriage }} ({{ item.acceptCode }})
+            </div>
             <div v-else>
-              <el-button type="warning" style="background-color: var(--el-button-bg-color) !important" @click="clickAddAcceptCode(item)">填写</el-button>
+              <el-button
+                type="warning"
+                style="background-color: var(--el-button-bg-color) !important"
+                @click="clickAddAcceptCode(item)"
+                >填写</el-button
+              >
             </div>
           </div>
         </template>
         <template #toView="{ item }">
           <div>
-            <el-button type="warning" style="background-color: var(--el-button-bg-color) !important" @click="clickToView(item)">查看</el-button>
+            <el-button
+              type="warning"
+              style="background-color: var(--el-button-bg-color) !important"
+              @click="clickToView(item)"
+              >查看</el-button
+            >
           </div>
         </template>
       </byTable>
     </div>
 
-    <el-dialog title="创建单证" v-if="dialogVisible" v-model="dialogVisible" width="1000">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+    <el-dialog
+      title="创建单证"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="1000"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+        v-loading="loadingDialog"
+      >
         <template #details>
           <div style="width: 100%">
-            <el-table :data="formData.data.documentsProductList" style="width: 100%; margin-top: 16px">
+            <el-table
+              :data="formData.data.documentsProductList"
+              style="width: 100%; margin-top: 16px"
+            >
               <el-table-column label="货物描述" min-width="240">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'documentsProductList.' + $index + '.describes'" :rules="rules.describes" :inline-message="true">
-                      <el-input v-model="row.describes" placeholder="请输入货物描述" />
+                    <el-form-item
+                      :prop="'documentsProductList.' + $index + '.describes'"
+                      :rules="rules.describes"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.describes"
+                        placeholder="请输入货物描述"
+                      />
                     </el-form-item>
                   </div>
                 </template>
@@ -47,8 +82,15 @@
               <el-table-column label="副描述" min-width="200">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'documentsProductList.' + $index + '.subDescribe'" :rules="rules.subDescribe" :inline-message="true">
-                      <el-input v-model="row.subDescribe" placeholder="请输入副描述" />
+                    <el-form-item
+                      :prop="'documentsProductList.' + $index + '.subDescribe'"
+                      :rules="rules.subDescribe"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.subDescribe"
+                        placeholder="请输入副描述"
+                      />
                     </el-form-item>
                   </div>
                 </template>
@@ -56,8 +98,15 @@
               <el-table-column label="海关编码" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'documentsProductList.' + $index + '.customsCode'" :rules="rules.customsCode" :inline-message="true">
-                      <el-input v-model="row.customsCode" placeholder="请输入海关编码" />
+                    <el-form-item
+                      :prop="'documentsProductList.' + $index + '.customsCode'"
+                      :rules="rules.customsCode"
+                      :inline-message="true"
+                    >
+                      <el-input
+                        v-model="row.customsCode"
+                        placeholder="请输入海关编码"
+                      />
                     </el-form-item>
                   </div>
                 </template>
@@ -65,8 +114,19 @@
               <el-table-column label="数量" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'documentsProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
-                      <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
+                    <el-form-item
+                      :prop="'documentsProductList.' + $index + '.quantity'"
+                      :rules="rules.quantity"
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.quantity"
+                        placeholder="请输入数量"
+                        style="width: 100%"
+                        :precision="0"
+                        :controls="false"
+                        :min="0"
+                      />
                     </el-form-item>
                   </div>
                 </template>
@@ -74,8 +134,19 @@
               <el-table-column label="单价" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item :prop="'documentsProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
-                      <el-input-number v-model="row.price" placeholder="请输入单价" style="width: 100%" :precision="2" :controls="false" :min="0" />
+                    <el-form-item
+                      :prop="'documentsProductList.' + $index + '.price'"
+                      :rules="rules.price"
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.price"
+                        placeholder="请输入单价"
+                        style="width: 100%"
+                        :precision="2"
+                        :controls="false"
+                        :min="0"
+                      />
                     </el-form-item>
                   </div>
                 </template>
@@ -86,15 +157,34 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="货运详情" v-if="openAddAcceptCode" v-model="openAddAcceptCode" width="600">
-      <byForm :formConfig="formConfigTwo" :formOption="formOption" v-model="formDataTwo.data" :rules="rulesTwo" ref="submitTwo" v-loading="loadingTwo">
+    <el-dialog
+      title="货运详情"
+      v-if="openAddAcceptCode"
+      v-model="openAddAcceptCode"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfigTwo"
+        :formOption="formOption"
+        v-model="formDataTwo.data"
+        :rules="rulesTwo"
+        ref="submitTwo"
+        v-loading="loadingTwo"
+      >
         <template #departureTime>
           <div>
-            <el-date-picker v-model="formDataTwo.data.departureTime" type="datetime" placeholder="请选择起运时间" value-format="YYYY-MM-DD HH:mm:ss" />
+            <el-date-picker
+              v-model="formDataTwo.data.departureTime"
+              type="datetime"
+              placeholder="请选择起运时间"
+              value-format="YYYY-MM-DD HH:mm:ss"
+            />
           </div>
         </template>
         <template #file>
@@ -105,37 +195,74 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openAddAcceptCode = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitTwoForm()" size="large">确 定</el-button>
+        <el-button @click="openAddAcceptCode = false" size="large"
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="submitTwoForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="打印" v-if="openSelectPrint" v-model="openSelectPrint" width="600">
+    <el-dialog
+      title="打印"
+      v-if="openSelectPrint"
+      v-model="openSelectPrint"
+      width="600"
+    >
       <div>
         <el-button @click="clickPrint(1)" type="primary">装箱单</el-button>
         <el-button @click="clickPrint(2)" type="primary">商业发票</el-button>
       </div>
       <template #footer>
-        <el-button @click="openSelectPrint = false" size="large">关闭</el-button>
+        <el-button @click="openSelectPrint = false" size="large"
+          >关闭</el-button
+        >
       </template>
     </el-dialog>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
-      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+      <div
+        id="pdfDom"
+        style="width: 800px; padding: 16px; font-size: 12px !important"
+      >
         <div v-if="openStatus === 1">
-          <div style="font-size: 16px; text-align: center; font-weight: 700">装箱单</div>
-          <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">PACKING LIST</div>
+          <div style="font-size: 16px; text-align: center; font-weight: 700">
+            装箱单
+          </div>
+          <div
+            style="
+              font-size: 16px;
+              text-align: center;
+              text-decoration: underline;
+              font-weight: 700;
+            "
+          >
+            PACKING LIST
+          </div>
         </div>
         <div v-else-if="openStatus === 2">
-          <div style="font-size: 16px; text-align: center; font-weight: 700">商业发票</div>
-          <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">COMMERCIAL INVOICE</div>
+          <div style="font-size: 16px; text-align: center; font-weight: 700">
+            商业发票
+          </div>
+          <div
+            style="
+              font-size: 16px;
+              text-align: center;
+              text-decoration: underline;
+              font-weight: 700;
+            "
+          >
+            COMMERCIAL INVOICE
+          </div>
         </div>
         <div style="padding-top: 8px">
           <div>C.I. NO. : {{ printDetails.contract.code }}</div>
@@ -147,7 +274,9 @@
             <div style="font-weight: 700">买方 SOLD TO MESSRS:</div>
             <div>{{ printDetails.customer.name }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.buyCountryName }},{{ printDetails.contract.buyProvinceName }},{{ printDetails.contract.buyCityName }},{{
+              {{ printDetails.contract.buyCountryName }},{{
+                printDetails.contract.buyProvinceName
+              }},{{ printDetails.contract.buyCityName }},{{
                 printDetails.contract.buyAddress
               }}
             </div>
@@ -159,7 +288,9 @@
             <div>{{ printDetails.corporation.name }}</div>
             <div>{{ printDetails.corporation.nameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.sellCountryId }},{{ printDetails.contract.sellProvinceId }},{{ printDetails.contract.sellCityId }},{{
+              {{ printDetails.contract.sellCountryId }},{{
+                printDetails.contract.sellProvinceId
+              }},{{ printDetails.contract.sellCityId }},{{
                 printDetails.contract.sellAddress
               }}
             </div>
@@ -170,31 +301,76 @@
         <div style="height: 16px"></div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="font-weight: 700">原产国 COUNTRY OF ORIGIN:</div>
               <div>{{ printDetails.contract.sellCountryId }}</div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="font-weight: 700">目的国 COUNTRY OF DESTINATION:</div>
               <div>{{ printDetails.documents.countryName }}</div>
             </div>
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="font-weight: 700">贸易方式 TERMS OF DELIVERY:</div>
-              <div>{{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}</div>
+              <div>
+                {{
+                  dictValueLabel(
+                    printDetails.contract.tradeMethods,
+                    tradeMethods
+                  )
+                }}
+              </div>
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="font-weight: 700">付款方式 TERMS OF PAYMENT:</div>
-              <div>{{ dictValueLabel(printDetails.contract.paymentMethod, fundsPaymentMethod) }}</div>
+              <div>
+                {{
+                  dictValueLabel(
+                    printDetails.contract.paymentMethod,
+                    fundsPaymentMethod
+                  )
+                }}
+              </div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="font-weight: 700">交货期 DELIVERY TIME:</div>
               <div>{{ printDetails.contract.deliveryTime }}</div>
             </div>
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="font-weight: 700">运输方式 EXPORT BY/VIA:</div>
-              <div>{{ dictValueLabel(printDetails.contract.transportMethod, shippingMethod) }}</div>
+              <div>
+                {{
+                  dictValueLabel(
+                    printDetails.contract.transportMethod,
+                    shippingMethod
+                  )
+                }}
+              </div>
             </div>
           </div>
           <div style="display: flex; width: 100%">
@@ -209,7 +385,9 @@
             <div style="width: 33%">
               <div style="font-weight: 700">质保期 WARRANTY:</div>
               <div>
-                <span v-if="printDetails.contract.warranty">{{ printDetails.contract.warranty }}天</span>
+                <span v-if="printDetails.contract.warranty"
+                  >{{ printDetails.contract.warranty }}天</span
+                >
               </div>
             </div>
           </div>
@@ -219,12 +397,24 @@
           <div style="display: flex; width: 100%">
             <div style="width: 33%; border-right: 1px solid black">
               <div style="font-weight: 700">唛头及箱号 MARK & NUMBERS</div>
-              <div style="padding: 8px 0" v-html="getStyle(printDetails.documents.remark)"></div>
+              <div
+                style="padding: 8px 0"
+                v-html="getStyle(printDetails.documents.remark)"
+              ></div>
             </div>
             <div style="width: 34%; border-right: 1px solid black">
               <div style="font-weight: 700">包装规格 PACKING & DESCRIPTION</div>
-              <div v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
-                <div style="padding: 8px 0" v-for="(item, index) in printDetails.packDetailList" :key="index">
+              <div
+                v-if="
+                  printDetails.packDetailList &&
+                  printDetails.packDetailList.length > 0
+                "
+              >
+                <div
+                  style="padding: 8px 0"
+                  v-for="(item, index) in printDetails.packDetailList"
+                  :key="index"
+                >
                   <span style="padding-right: 16px">{{ index + 1 }}</span>
                   <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
                   <span>*</span>
@@ -247,7 +437,13 @@
           </div>
         </div>
         <div style="height: 16px"></div>
-        <table class="three" cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-bottom: 0">
+        <table
+          class="three"
+          cellspacing="0"
+          cellpadding="0"
+          border="0"
+          style="width: 100%; border-bottom: 0"
+        >
           <thead>
             <tr>
               <td style="width: 100px">
@@ -282,69 +478,141 @@
                 <br />
                 UNIT PRICE
                 <br />
-                {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
+                {{
+                  dictValueLabel(
+                    printDetails.contract.currency,
+                    accountCurrency
+                  )
+                }}
               </td>
               <td style="width: 100px; border-right: 0" v-if="openStatus === 2">
                 总价
                 <br />
                 TOTAL PRICE
                 <br />
-                {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
+                {{
+                  dictValueLabel(
+                    printDetails.contract.currency,
+                    accountCurrency
+                  )
+                }}
               </td>
             </tr>
           </thead>
-          <tbody v-if="printDetails.documentsProducts && printDetails.documentsProducts.length > 0">
-            <tr v-for="(item, index) in printDetails.documentsProducts" :key="index">
+          <tbody
+            v-if="
+              printDetails.documentsProducts &&
+              printDetails.documentsProducts.length > 0
+            "
+          >
+            <tr
+              v-for="(item, index) in printDetails.documentsProducts"
+              :key="index"
+            >
               <td style="text-align: center">{{ index + 1 }}</td>
               <td>
                 <div style="text-align: center">{{ item.describes }}</div>
                 <div style="text-align: center">{{ item.subDescribe }}</div>
-                <div style="text-align: center">HS CODE: {{ item.customsCode }}</div>
+                <div style="text-align: center">
+                  HS CODE: {{ item.customsCode }}
+                </div>
               </td>
               <td style="text-align: center">{{ item.quantity }}</td>
-              <td :rowspan="printDetails.documentsProducts.length" style="text-align: center" v-if="index === 0 && openStatus === 1">
+              <td
+                :rowspan="printDetails.documentsProducts.length"
+                style="text-align: center"
+                v-if="index === 0 && openStatus === 1"
+              >
                 {{ printDetails.sumBomVolume }}
               </td>
-              <td :rowspan="printDetails.documentsProducts.length" style="text-align: center; border-right: 0" v-if="index === 0 && openStatus === 1">
+              <td
+                :rowspan="printDetails.documentsProducts.length"
+                style="text-align: center; border-right: 0"
+                v-if="index === 0 && openStatus === 1"
+              >
                 {{ printDetails.sumRoughWeight }}
               </td>
-              <td style="text-align: center" v-if="openStatus === 2">{{ printDetails.contract.currency }}{{ item.price }}</td>
-              <td style="text-align: center; border-right: 0" v-if="openStatus === 2">
-                {{ printDetails.contract.currency }}{{ parseFloat(Number(item.quantity) * Number(item.price)).toFixed(2) }}
+              <td style="text-align: center" v-if="openStatus === 2">
+                {{ printDetails.contract.currency }}{{ item.price }}
+              </td>
+              <td
+                style="text-align: center; border-right: 0"
+                v-if="openStatus === 2"
+              >
+                {{ printDetails.contract.currency
+                }}{{
+                  parseFloat(
+                    Number(item.quantity) * Number(item.price)
+                  ).toFixed(2)
+                }}
               </td>
             </tr>
           </tbody>
           <template v-if="openStatus === 2">
             <tr>
               <td :colspan="2" style="text-align: left">SUBTOTAL:</td>
-              <td style="text-align: center">{{ statistics("quantity", "", 0) }}</td>
+              <td style="text-align: center">
+                {{ statistics("quantity", "", 0) }}
+              </td>
               <td></td>
-              <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
+              <td style="text-align: center">
+                {{ printDetails.contract.currency
+                }}{{ statistics("price", "quantity", 2) }}
+              </td>
             </tr>
             <tr>
               <td :colspan="4" style="text-align: left">TOTAL EXW PRICE:</td>
-              <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
+              <td style="text-align: center">
+                {{ printDetails.contract.currency
+                }}{{ statistics("price", "quantity", 2) }}
+              </td>
             </tr>
           </template>
         </table>
         <div v-if="openStatus === 1">
-          <div style="font-weight: 700; padding: 4px 0">THE PACK FOR ABOVE CARGO ARE AS BELOWING SHOWS:</div>
+          <div style="font-weight: 700; padding: 4px 0">
+            THE PACK FOR ABOVE CARGO ARE AS BELOWING SHOWS:
+          </div>
           <table
             class="three"
             cellspacing="0"
             cellpadding="0"
             border="0"
             style="width: 100%; border-bottom: 0"
-            v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
-            <tbody v-for="(item, index) in printDetails.packDetailList" :key="index">
-              <tr v-for="(itemAAA, indexAAA) in item.packDetailGoodsList" :key="indexAAA">
-                <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 100px" v-if="indexAAA === 0">CTN NO.{{ index + 1 }}</td>
+            v-if="
+              printDetails.packDetailList &&
+              printDetails.packDetailList.length > 0
+            "
+          >
+            <tbody
+              v-for="(item, index) in printDetails.packDetailList"
+              :key="index"
+            >
+              <tr
+                v-for="(itemAAA, indexAAA) in item.packDetailGoodsList"
+                :key="indexAAA"
+              >
+                <td
+                  :rowspan="item.packDetailGoodsList.length"
+                  style="text-align: center; width: 100px"
+                  v-if="indexAAA === 0"
+                >
+                  CTN NO.{{ index + 1 }}
+                </td>
                 <td>
                   <div style="text-align: center">{{ itemAAA.remark }}</div>
                 </td>
-                <td style="text-align: center; width: 100px">{{ itemAAA.unit }}</td>
-                <td style="text-align: center; width: 100px">{{ itemAAA.quantity }}</td>
-                <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 200px; border-right: 0" v-if="indexAAA === 0">
+                <td style="text-align: center; width: 100px">
+                  {{ itemAAA.unit }}
+                </td>
+                <td style="text-align: center; width: 100px">
+                  {{ itemAAA.quantity }}
+                </td>
+                <td
+                  :rowspan="item.packDetailGoodsList.length"
+                  style="text-align: center; width: 200px; border-right: 0"
+                  v-if="indexAAA === 0"
+                >
                   <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
                   <span>*</span>
                   <span v-if="item.boxLong">{{ item.boxWide }}cm</span>
@@ -359,7 +627,9 @@
       </div>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -452,11 +722,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/documents/delete", {
                     id: row.id,
@@ -619,7 +893,9 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractId: [{ required: true, message: "请选择出货主合同", trigger: "change" }],
+  contractId: [
+    { required: true, message: "请选择出货主合同", trigger: "change" },
+  ],
   countryId: [{ required: true, message: "请选择目的国", trigger: "change" }],
   describes: [{ required: true, message: "请输入货物描述", trigger: "blur" }],
   subDescribe: [{ required: true, message: "请输入副描述", trigger: "blur" }],
@@ -653,23 +929,27 @@ const changeContract = (val) => {
     let data = shipmentList.value.filter((item) => item.value === val);
     if (data && data.length > 0) {
       formData.data.packShipmentId = data[0].packShipmentId;
-      proxy.post("/packShipment/productDetailList", { packDetailIds: data[0].packDetailIds }).then((res) => {
-        if (res && res.length > 0) {
-          formData.data.documentsProductList = res.map((item) => {
-            return {
-              productId: item.productId,
-              describes: item.remark,
-              subDescribe: item.subDescription,
-              customsCode: item.customsCode,
-              quantity: item.quantity,
-              price: item.price,
-              type: item.type,
-            };
-          });
-        } else {
-          formData.data.documentsProductList = [];
-        }
-      });
+      proxy
+        .post("/packShipment/productDetailList", {
+          packDetailIds: data[0].packDetailIds,
+        })
+        .then((res) => {
+          if (res && res.length > 0) {
+            formData.data.documentsProductList = res.map((item) => {
+              return {
+                productId: item.productId,
+                describes: item.remark,
+                subDescribe: item.subDescription,
+                customsCode: item.customsCode,
+                quantity: item.quantity,
+                price: item.price,
+                type: item.type,
+              };
+            });
+          } else {
+            formData.data.documentsProductList = [];
+          }
+        });
     } else {
       formData.data.documentsProductList = [];
     }
@@ -744,9 +1024,13 @@ const formConfigTwo = computed(() => {
   ];
 });
 const rulesTwo = ref({
-  acceptCarriage: [{ required: true, message: "请输入承运方", trigger: "blur" }],
+  acceptCarriage: [
+    { required: true, message: "请输入承运方", trigger: "blur" },
+  ],
   code: [{ required: true, message: "请输入承运单号", trigger: "blur" }],
-  departureTime: [{ required: true, message: "请选择起运时间", trigger: "change" }],
+  departureTime: [
+    { required: true, message: "请选择起运时间", trigger: "change" },
+  ],
 });
 const clickAddAcceptCode = (item) => {
   formDataTwo.data = {
@@ -825,9 +1109,11 @@ const clickPrint = (status) => {
   };
   openStatus.value = status;
   openPrint.value = true;
-  proxy.get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id }).then((res) => {
-    printDetails.value = res.data;
-  });
+  proxy
+    .get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id })
+    .then((res) => {
+      printDetails.value = res.data;
+    });
 };
 const clickDownload = () => {
   if (openStatus.value === 1) {
@@ -845,11 +1131,16 @@ const getStyle = (text) => {
 };
 const statistics = (label, label2, index) => {
   let num = 0;
-  if (printDetails.value.documentsProducts && printDetails.value.documentsProducts.length > 0) {
+  if (
+    printDetails.value.documentsProducts &&
+    printDetails.value.documentsProducts.length > 0
+  ) {
     printDetails.value.documentsProducts.map((item) => {
       if (label2) {
         if (item[label] && item[label2]) {
-          num = parseFloat(Number(num) + Number(item[label]) * Number(item[label2])).toFixed(index);
+          num = parseFloat(
+            Number(num) + Number(item[label]) * Number(item[label2])
+          ).toFixed(index);
         }
       } else {
         if (item[label]) {

+ 268 - 275
src/views/system/dict/dictTenantDtl.vue

@@ -1,308 +1,301 @@
 <template>
-	<div class="dictTenantDtl">
-		<el-button type="primary" @click="openModal">添加</el-button>
-		<div class="content">
-			<byTable
-				:source="sourceList.data"
-				:pagination="sourceList.pagination"
-				:config="config"
-				:loading="loading"
-				highlight-current-row
-				:hideSearch="true"
-				@get-list="getList"
-			>
-				<template #slotName="{ item }">
-					{{ item.createTime }}
-				</template>
-			</byTable>
-		</div>
-		<el-dialog
-			:title="modalType == 'add' ? '新增' : '编辑'"
-			v-model="dialogVisible"
-			width="400"
-			v-loading="loading"
-		>
-			<byForm
-				:formConfig="formConfig"
-				:formOption="formOption"
-				v-model="formData.data"
-				:rules="rules"
-				ref="byform"
-			>
-			</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>
-	</div>
+  <div class="dictTenantDtl">
+    <el-button type="primary" @click="openModal">添加</el-button>
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :hideSearch="true"
+        @get-list="getList"
+      >
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="400"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+      </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>
+  </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 { computed, defineComponent, ref,watch} from 'vue'
-import { get } from '@vueuse/shared'
-const { proxy } = getCurrentInstance()
-const loading = ref(false)
-const submitLoading = ref(false)
-const dictCommonModal = ref(true)
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref, watch } from "vue";
+import { get } from "@vueuse/shared";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const dictCommonModal = ref(true);
 defineProps({
-	data: {
-		type: Object,
-		default: false,
-	},
-})
+  data: {
+    type: Object,
+    default: false,
+  },
+});
 watch(proxy.data, (newValue, oldValue) => {
-  getList()
+  getList();
 });
 const sourceList = ref({
-	data: [],
-	pagination: {
-		total: 3,
-		pageNum: 1,
-		pageSize: 10,
-	},
-})
-let dialogVisible = ref(false)
-let roomDialogVisible = ref(false)
-let modalType = ref('add')
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let roomDialogVisible = ref(false);
+let modalType = ref("add");
 let rules = ref({
-	dictKey: [{ required: true, message: '请输入key', trigger: 'blur' }],
-	dictValue: [{ required: true, message: '请输入val', trigger: 'blur' }],
-	sort: [{ required: true, message: '请输入排序', trigger: 'blur' }],
-})
+  dictKey: [{ required: true, message: "请输入key", trigger: "blur" }],
+  dictValue: [{ required: true, message: "请输入val", trigger: "blur" }],
+  sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
+});
 
 const selectConfig = computed(() => {
-	return [
-		{
-			label: '状态',
-			prop: 'status',
-			data: [
-				{
-					label: '禁用',
-					value: '0',
-				},
-				{
-					label: '启用',
-					value: '1',
-				},
-			],
-		},
-	]
-})
+  return [
+    {
+      label: "状态",
+      prop: "status",
+      data: [
+        {
+          label: "禁用",
+          value: "0",
+        },
+        {
+          label: "启用",
+          value: "1",
+        },
+      ],
+    },
+  ];
+});
 const config = computed(() => {
-	return [
-		{
-			attrs: {
-				label: '键',
-				prop: 'dictKey',
-			},
-		},
-		{
-			attrs: {
-				label: '值',
-				prop: 'dictValue',
-			},
-		},
-		{
-			attrs: {
-				label: '排序',
-				prop: 'sort',
-			},
-		},
-		{
-			attrs: {
-				label: '操作',
-				width: '200',
-				align: 'right',
-			},
-			// 渲染 el-button,一般用在最后一列。
-			renderHTML(row) {
-				if (row.type == 2) {
-					return [
-						{
-							attrs: {
-								label: '修改',
-								type: 'primary',
-								text: true,
-							},
-							el: 'button',
-							click() {
-								getDtl(row)
-							},
-						},
-						{
-							attrs: {
-								label: '删除',
-								type: 'primary',
-								text: true,
-							},
-							el: 'button',
-							click() {
-								// 弹窗提示是否删除
-								ElMessageBox.confirm(
-									'此操作将删除该数据, 是否继续?',
-									'提示',
-									{
-										confirmButtonText: '确定',
-										cancelButtonText: '取消',
-										type: 'warning',
-									}
-								).then(() => {
-									// 删除
-									proxy
-										.post('/dictTenantData/delete', {
-											id: row.id,
-										})
-										.then((res) => {
-											ElMessage({
-												message: '删除成功',
-												type: 'success',
-											})
-											getList()
-										})
-								})
-							},
-						},
-					]
-				}
-			},
-		},
-	]
-})
+  return [
+    {
+      attrs: {
+        label: "键",
+        prop: "dictKey",
+      },
+    },
+    {
+      attrs: {
+        label: "值",
+        prop: "dictValue",
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "sort",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        if (row.type == 2) {
+          return [
+            {
+              attrs: {
+                label: "修改",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                getDtl(row);
+              },
+            },
+            {
+              attrs: {
+                label: "删除",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                // 弹窗提示是否删除
+                ElMessageBox.confirm("此操作将删除该数据, 是否继续?", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(() => {
+                  // 删除
+                  proxy
+                    .post("/dictTenantData/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      ElMessage({
+                        message: "删除成功",
+                        type: "success",
+                      });
+                      getList();
+                    });
+                });
+              },
+            },
+          ];
+        }
+      },
+    },
+  ];
+});
 
 let formData = reactive({
-	data: {},
-	treeData: [],
-})
+  data: {},
+  treeData: [],
+});
 const formOption = reactive({
-	inline: true,
-	labelWidth: 100,
-	itemWidth: 100,
-	rules: [],
-})
-const byform = ref(null)
-const treeData = ref([])
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const treeData = ref([]);
 const formConfig = computed(() => {
-	return [
-		{
-			type: 'input',
-			prop: 'dictKey',
-			label: '键',
-			required: true,
-		},
-		{
-			type: 'input',
-			prop: 'dictValue',
-			label: '值',
-		},
-		{
-			label: '排序',
-			prop: 'sort',
-			type: 'input',
-			itemType: 'number',
-		},
-	]
-})
+  return [
+    {
+      type: "input",
+      prop: "dictKey",
+      label: "键",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "dictValue",
+      label: "值",
+    },
+    {
+      label: "排序",
+      prop: "sort",
+      type: "input",
+      itemType: "number",
+    },
+  ];
+});
 const getList = async (req) => {
-	console.log(proxy.data.data.code)
-	sourceList.value.pagination = {
-		...sourceList.value.pagination,
-		...req,
-		dictCode: proxy.data.data.code,
-		tenantId: proxy.data.data.tenantId,
-	}
-	loading.value = true
-	proxy
-		.post('/dictTenantData/page', sourceList.value.pagination)
-		.then((message) => {
-			
-			sourceList.value.data = message.rows
-			sourceList.value.pagination.total = message.total
-			console.log(sourceList.value.data)
-			setTimeout(() => {
-				loading.value = false
-			}, 200)
-		})
-}
+  console.log(proxy.data.data.code);
+  sourceList.value.pagination = {
+    ...sourceList.value.pagination,
+    ...req,
+    dictCode: proxy.data.data.code,
+    tenantId: proxy.data.data.tenantId,
+  };
+  loading.value = true;
+  proxy
+    .post("/dictTenantData/page", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      console.log(sourceList.value.data);
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
 const openModal = () => {
-	dialogVisible.value = true
-	modalType.value = 'add'
-	formData.data = {}
-}
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
 
 const submitForm = () => {
-	console.log(byform.value)
-	byform.value.handleSubmit((valid) => {
-		submitLoading.value = true
-		formData.data.dictCode = proxy.data.data.code
-		formData.data.tenantId = proxy.data.data.tenantId
-		proxy
-			.post('/dictTenantData/' + modalType.value, formData.data)
-			.then((res) => {
-				ElMessage({
-					message: modalType.value == 'add' ? '添加成功' : '编辑成功',
-					type: 'success',
-				})
-				dialogVisible.value = false
-				submitLoading.value = false
-				getList()
-			})
-			.catch((err) => {
-				submitLoading.value = false
-			})
-	})
-}
+  console.log(byform.value);
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    formData.data.dictCode = proxy.data.data.code;
+    formData.data.tenantId = proxy.data.data.tenantId;
+    proxy
+      .post("/dictTenantData/" + modalType.value, formData.data)
+      .then((res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      })
+      .catch((err) => {
+        submitLoading.value = false;
+      });
+  });
+};
 
 const getDtl = (row) => {
-	formData.data = { ...row }
-	modalType.value = 'edit'
-	dialogVisible.value = true
-}
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
 
 const changeStatus = (row) => {
-	modalType.value = 'edit'
-	let status = row.status ? 0 : 1
-	proxy.post('/tenantInfo/detail', { id: row.id }).then((res) => {
-		res.status = status
-		formData.data = res
-		ElMessageBox.confirm('你是否确认此操作?', '提示', {
-			confirmButtonText: '确定',
-			cancelButtonText: '取消',
-			type: 'warning',
-		}).then(() => {
-			// 删除
-			proxy
-				.post('/tenantInfo/' + modalType.value, formData.data)
-				.then((res) => {
-					ElMessage({
-						message: '操作成功',
-						type: 'success',
-					})
-					getList()
-				})
-		})
-	})
-}
-getList()
+  modalType.value = "edit";
+  let status = row.status ? 0 : 1;
+  proxy.post("/tenantInfo/detail", { id: row.id }).then((res) => {
+    res.status = status;
+    formData.data = res;
+    ElMessageBox.confirm("你是否确认此操作?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }).then(() => {
+      // 删除
+      proxy
+        .post("/tenantInfo/" + modalType.value, formData.data)
+        .then((res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          getList();
+        });
+    });
+  });
+};
+getList();
 </script>
     
   <style lang="scss" scoped>
 .dictTenantDtl {
 }
 .tenant {
-	padding: 20px;
+  padding: 20px;
 }
 </style>

+ 42 - 18
src/views/systemTenant/tenant/dictTenant/dictTenantDtl.vue

@@ -9,17 +9,37 @@
         :loading="loading"
         highlight-current-row
         :hideSearch="true"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #slotName="{ item }">
           {{ item.createTime }}
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-model="dialogVisible" width="400" v-loading="loading">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform"> </byForm>
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="400"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+      </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>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -176,14 +196,16 @@ const getList = async (req) => {
     tenantId: useUserStore().user.tenantId,
   };
   loading.value = true;
-  proxy.post("/dictTenantData/page", sourceList.value.pagination).then((message) => {
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    console.log(sourceList.value.data);
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/dictTenantData/page", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      console.log(sourceList.value.data);
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -232,13 +254,15 @@ const changeStatus = (row) => {
       type: "warning",
     }).then(() => {
       // 删除
-      proxy.post("/tenantInfo/" + modalType.value, formData.data).then((res) => {
-        ElMessage({
-          message: "操作成功",
-          type: "success",
+      proxy
+        .post("/tenantInfo/" + modalType.value, formData.data)
+        .then((res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          getList();
         });
-        getList();
-      });
     });
   });
 };

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно