cz 1 gadu atpakaļ
vecāks
revīzija
141302d2b0

+ 55 - 47
src/components/PDF/purchasePDF.vue

@@ -2,41 +2,47 @@
   <div>
     <div id="pdfDom" ref="pdfDom" style="width: 776px">
       <div style="border: 1px solid #000; border-collapse: collapse">
-        <div style="text-align: right; padding: 2px 4px 0 0">
+        <div style="text-align: right; padding: 10px 10px 0 0">
           合同号:{{ pdfData.code }}
         </div>
         <div class="title">购销合同</div>
         <div style="display: flex">
-          <div style="display: flex; width: 50%; padding-right: 20px">
+          <div style="display: flex; width: 50%" class="padding-10px">
             <div style="width: 60px">买方:</div>
             <div style="width: calc(100% - 60px)">
               <div>福建宏星电子科技有限公司</div>
-              <div>福建省福州市鼓楼区软件大道89号福州软件园A区28号楼五层</div>
+              <div class="margin-top-5px">
+                福建省福州市鼓楼区软件大道89号福州软件园A区28号楼五层
+              </div>
             </div>
           </div>
-          <div style="display: flex; width: 50%; padding-left: 20px">
+          <div style="display: flex; width: 50%" class="padding-10px">
             <div style="width: 60px">卖方:</div>
             <div style="width: calc(100% - 60px)">
               {{ pdfData.supplyName }}
             </div>
           </div>
         </div>
-        <div style="display: flex">
-          <div style="display: flex; width: 50%; padding-right: 20px">
+        <div style="display: flex" class="margin-top-5px">
+          <div style="display: flex; width: 50%" class="padding-10px">
             <div style="width: 60px">经手人:</div>
             <div style="width: calc(100% - 60px)">
               {{ pdfData.purchaseName }}
             </div>
           </div>
-          <div style="display: flex; width: 50%; padding-left: 20px">
+          <div style="display: flex; width: 50%" class="padding-10px">
             <div style="width: 60px">经手人:</div>
             <div style="width: calc(100% - 60px)">
               {{ pdfData.contactPerson }}
             </div>
           </div>
         </div>
-        <div>买卖双方经协商,一致同意签订以下合同</div>
-        <div>货物名称、规格型号、单位、数量、单价及金额:</div>
+        <div class="padding-10px margin-top-5px">
+          买卖双方经协商,一致同意签订以下合同
+        </div>
+        <div class="padding-10px margin-top-5px" style="padding-bottom: 10px">
+          货物名称、规格型号、单位、数量、单价及金额:
+        </div>
         <table border="1" style="width: 100%" class="table">
           <tr>
             <td style="width: 70px">序号</td>
@@ -63,7 +69,7 @@
             </td>
           </tr>
           <tr>
-            <td colspan="4" style="text-align: right">其他收费项目</td>
+            <td colspan="4" style="text-align: right">其他收费项目</td>
             <td></td>
             <td></td>
             <td>
@@ -72,7 +78,7 @@
             </td>
           </tr>
           <tr>
-            <td colspan="4" style="text-align: right">合计</td>
+            <td colspan="4" style="text-align: right">合计</td>
             <td>{{ pdfData.countTotal }}</td>
             <td></td>
             <td>
@@ -86,7 +92,7 @@
             </td>
           </tr>
           <tr>
-            <td>交货地点</td>
+            <td>交货地点</td>
             <td colspan="6" style="text-align: left">
               福建省福州市鼓楼区软件大道89号福州软件园A区28号楼五层
             </td>
@@ -96,50 +102,50 @@
               <td colspan="6" style="text-align: left"></td>
             </tr> -->
           <tr>
-            <td>保修期</td>
+            <td>保修期</td>
             <td colspan="6" style="text-align: left">一年</td>
           </tr>
           <tr>
-            <td colspan="7" style="text-align: left; padding: 0px">
-              <div style="padding: 2px 0px">
-                一、交货地点:福州软件园A区28座5层。
-              </div>
-              <div style="padding: 2px 0px">二、运输方式及运费:买方承担。</div>
-              <div style="padding: 2px 0px">
+            <td colspan="7" style="text-align: left; padding: 10px">
+              <div>一、交货地点:福州软件园A区28座5层。</div>
+              <div class="margin-top-5px">二、运输方式及运费:买方承担。</div>
+              <div class="margin-top-5px">
                 三、质量要求:样品品质、型号、规格、数量如同买方确认上表规格所示,不符合则由卖方承担责任。
               </div>
-              <div style="padding: 2px 0px">四、交货时间:2023年4月13日。</div>
-              <div style="padding: 2px 0px">五、付款方式:银行转账。</div>
-              <div style="padding: 2px 0px">六、保修期:一年。</div>
-              <div style="padding: 2px 0px">
+              <div class="margin-top-5px">四、交货时间:2023年4月13日。</div>
+              <div class="margin-top-5px">五、付款方式:银行转账。</div>
+              <div class="margin-top-5px">六、保修期:一年。</div>
+              <div class="margin-top-5px">
                 七、本合同经买卖双方签字盖章后生效,传真件有效。
               </div>
-              <div style="padding: 2px 0px">
+              <div class="margin-top-5px">
                 八、解决合同纠纷:原双方另有约定外,均按《中华人民共和国合同法》有关规定处理。
               </div>
-              <div style="padding: 2px 0px">九、其他约定事项:友好解决。</div>
+              <div class="margin-top-5px">九、其他约定事项:友好解决。</div>
             </td>
           </tr>
         </table>
         <div style="display: flex">
-          <div style="width: 50%; padding-right: 20px">
+          <div style="width: 50%; padding: 10px">
             <div>买方:</div>
-            <div>单位名称:福建宏星电子科技有限公司</div>
-            <div>
+            <div class="margin-top-5px">单位名称:福建宏星电子科技有限公司</div>
+            <div class="margin-top-5px">
               地址:福建省福州市鼓楼区软件大道89号福州软件园A区28号楼五层
             </div>
-            <div>电话:</div>
-            <div>传真:</div>
-            <div style="opacity: 0">|</div>
-            <div style="margin-top: auto">代表人签字:</div>
+            <div class="margin-top-5px">电话:</div>
+            <div class="margin-top-5px">传真:</div>
+            <!-- <div style="opacity: 0.1" class="margin-top-5px">|</div> -->
+            <div class="margin-top-5px">代表人签字:</div>
           </div>
-          <div style="width: 50%; padding-left: 20px">
+          <div style="width: 50%; padding: 10px">
             <div>卖方:</div>
-            <div>单位名称:{{ pdfData.supplyName }}</div>
-            <div>统一社会信用代码:</div>
-            <div>开户银行:{{ pdfData.openingBank }}</div>
-            <div>帐号:{{ pdfData.accountOpening }}</div>
-            <div>
+            <div class="margin-top-5px">单位名称:{{ pdfData.supplyName }}</div>
+            <div class="margin-top-5px">统一社会信用代码:</div>
+            <div class="margin-top-5px">
+              开户银行:{{ pdfData.openingBank }}
+            </div>
+            <div class="margin-top-5px">帐号:{{ pdfData.accountOpening }}</div>
+            <div class="margin-top-5px">
               地址:<span
                 v-if="
                   pdfData.supplyAddress && pdfData.supplyAddress.countryName
@@ -161,16 +167,12 @@
                 >,{{ pdfData.supplyAddress.areaDetail }}</span
               >
             </div>
-            <div>电话:{{ pdfData.contactNumber }}</div>
-            <div>代表人签字:</div>
+            <div class="margin-top-5px">电话:{{ pdfData.contactNumber }}</div>
+            <div class="margin-top-5px">代表人签字:</div>
           </div>
         </div>
         <div
-          style="
-            padding: 30px 0px 20px 0;
-            text-align: right;
-            border-top: 1px solid #000;
-          "
+          style="padding: 10px; text-align: right; border-top: 1px solid #000"
         >
           签订日期:{{ pdfData.approvedDate }}
         </div>
@@ -265,8 +267,8 @@ watch(
     // margin-right: -1px;
 
     td {
-      text-align: center;
-      padding: 8px 0px;
+      // text-align: center;
+      padding: 5px 10px;
     }
     // tr td:last-child {
     //   border-right: 0 !important;
@@ -277,5 +279,11 @@ watch(
     justify-content: space-between;
     margin: 5px 0px;
   }
+  .padding-10px {
+    padding: 0px 10px;
+  }
+  .margin-top-5px {
+    margin-top: 5px;
+  }
 }
 </style>

+ 10 - 12
src/components/byTable/index.vue

@@ -46,7 +46,7 @@
         :class="'theme' + i.type"
         v-for="(i, index) in statConfig[statSelectVal].data"
         :key="index"
-        @click="i.click ? i.click(i,index) : ''"
+        @click="i.click ? i.click(i, index) : ''"
         :style="i.click ? 'cursor: pointer' : ''"
       >
         <div class="label">{{ i.label }}</div>
@@ -57,7 +57,8 @@
         v-for="(i, index) in statConfig[statSelectVal].data"
         :key="index"
         class="multi-data"
-        @click="i.click ? i.click(i,index) : ''"
+        :class="'theme' + i.type"
+        @click="i.click ? i.click(i, index) : ''"
         :style="i.click ? 'cursor: pointer' : ''"
       >
         <div class="label">{{ i.label }}</div>
@@ -86,18 +87,15 @@
           style="margin-right: 10px"
         >
           <div class="by-dropdown-title">
-            {{ 
-              pagination[i.prop] ?  
-              i.data.find(j => j.value === pagination[i.prop]) ? 
-              i.data.find(j => j.value === pagination[i.prop]).label : 
-              i.label : 
-              i.labelCopy
+            {{
+              pagination[i.prop]
+                ? i.data.find((j) => j.value === pagination[i.prop])
+                  ? i.data.find((j) => j.value === pagination[i.prop]).label
+                  : i.label
+                : i.labelCopy
             }}
             <!-- {{ i.label || i.labelCopy }} -->
-            <i
-              style="margin-left: 5px"
-              class="iconfont icon-iconm_xialan1"
-            ></i>
+            <i style="margin-left: 5px" class="iconfont icon-iconm_xialan1"></i>
           </div>
           <ul class="by-dropdown-lists">
             <li

+ 200 - 60
src/views/finance/fundManage/accountStatement/index.vue

@@ -22,7 +22,8 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <!-- <template #amount="{ item }">
           <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -43,8 +44,15 @@
         <template #contractCodes="{ item }">
           <div style="width: 100%">
             <div v-if="item.contractCodes">
-              <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
-                <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(contract)">{{ contract }}</a>
+              <div
+                v-for="(contract, index) in item.contractCodes.split(',')"
+                :key="index"
+              >
+                <a
+                  style="color: #409eff; cursor: pointer; word-break: break-all"
+                  @click="openDetails(contract)"
+                  >{{ contract }}</a
+                >
               </div>
             </div>
           </div>
@@ -52,11 +60,28 @@
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+    <el-dialog
+      :title="modalType == 'add' ? '添加流水' : '编辑流水'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+        v-loading="loadingDialog"
+      >
         <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>
@@ -64,15 +89,34 @@
             <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>
@@ -85,7 +129,8 @@
                     style="width: 100%"
                     :precision="2"
                     :controls="false"
-                    :min="0" />
+                    :min="0"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -95,7 +140,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>
@@ -103,35 +154,82 @@
       </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="dialogVisibleOne" v-model="dialogVisibleOne" width="600">
-      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="submitOne" v-loading="loadingDialog">
+    <el-dialog
+      :title="'退税登记'"
+      v-if="dialogVisibleOne"
+      v-model="dialogVisibleOne"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfigOne"
+        :formOption="formOption"
+        v-model="formData.dataOne"
+        :rules="rulesOne"
+        ref="submitOne"
+        v-loading="loadingDialog"
+      >
         <template #details>
           <div style="width: 100%">
-            <el-button type="primary" @click="handleAddRow" style="margin: 10px 0"> 添加 </el-button>
+            <el-button
+              type="primary"
+              @click="handleAddRow"
+              style="margin: 10px 0"
+            >
+              添加
+            </el-button>
             <el-table :data="formData.dataOne.taxRefundDetailsList">
               <el-table-column prop="count" label="合同编号" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'taxRefundDetailsList.' + $index + '.contractId'" :rules="rulesOne.contractId" :inline-message="true">
-                    <el-select v-model="row.contractId" placeholder="请选择" filterable style="width: 100%">
-                      <el-option v-for="item in contractList" :label="item.code" :value="item.id"> </el-option>
+                  <el-form-item
+                    :prop="'taxRefundDetailsList.' + $index + '.contractId'"
+                    :rules="rulesOne.contractId"
+                    :inline-message="true"
+                  >
+                    <el-select
+                      v-model="row.contractId"
+                      placeholder="请选择"
+                      filterable
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in contractList"
+                        :label="item.code"
+                        :value="item.id"
+                      >
+                      </el-option>
                     </el-select>
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="amount" label="关联金额" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'taxRefundDetailsList.' + $index + '.amount'" :rules="rulesOne.amount" :inline-message="true">
-                    <el-input-number onmousewheel="return false;" v-model="row.amount" :precision="2" :controls="false" :min="0" style="width: 100%" />
+                  <el-form-item
+                    :prop="'taxRefundDetailsList.' + $index + '.amount'"
+                    :rules="rulesOne.amount"
+                    :inline-message="true"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.amount"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      style="width: 100%"
+                    />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="80">
                 <template #default="{ $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>
@@ -139,8 +237,12 @@
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitFormOne()" size="large">确 定</el-button>
+        <el-button @click="dialogVisibleOne = false" size="large"
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="submitFormOne()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
@@ -149,7 +251,9 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" 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>
@@ -330,11 +434,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,
@@ -375,23 +483,28 @@ const getCurrency = () => {
     });
 };
 const getAccountList = () => {
-  return 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,
-        };
-      });
-      sourceList.value.pagination.accountManagementId = accountList.value[0].value;
-    }
-  });
+  return 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,
+          };
+        });
+        sourceList.value.pagination.accountManagementId =
+          accountList.value[0].value;
+      }
+    });
 };
 const getDict = () => {
   // 关联合同
-  proxy.post("/contract/page", { pageNum: 1, pageSize: 9999, status: 30 }).then((res) => {
-    contractList.value = res.rows;
-  });
+  proxy
+    .post("/contract/page", { pageNum: 1, pageSize: 9999, status: 30 })
+    .then((res) => {
+      contractList.value = res.rows;
+    });
 
   Promise.all([getCurrency(), getAccountList()]).then(() => {
     getList();
@@ -400,13 +513,15 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/accountRunningWater/page1", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/accountRunningWater/page1", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 const modalType = ref("add");
@@ -520,11 +635,23 @@ const formConfigOne = computed(() => {
       label: "退税时间",
     },
     {
-      type: "selectInput",
+      type: "select",
+      prop: "currency",
+      label: "货币类型",
+      data: accountCurrency.value,
+      itemWidth: 30,
+    },
+    {
+      type: "number",
       prop: "amount",
-      selectProp: "currency",
       label: "退税金额",
-      data: accountCurrency.value,
+      itemWidth: 70,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
     },
     {
       type: "title",
@@ -567,19 +694,29 @@ const formConfigOne = 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" }],
 });
 const rulesOne = 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" },
+  ],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   // amount: [{ required: true, message: "请输入退税金额", trigger: "blur" }],
   contractId: [{ required: true, message: "请选择合同", trigger: "change" }],
@@ -658,7 +795,10 @@ const submitFormOne = () => {
         });
       }
     }
-    const total = submitData.taxRefundDetailsList.reduce((sum, crr) => (sum += crr.amount), 0);
+    const total = submitData.taxRefundDetailsList.reduce(
+      (sum, crr) => (sum += crr.amount),
+      0
+    );
     if (total !== Number(submitData.amount)) {
       return ElMessage({
         message: "关联合同明细的关联金额总合必须等于退税金额",

+ 90 - 1
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -8,6 +8,7 @@
         :config="config"
         :loading="loading"
         highlight-current-row
+        :statConfig="statConfig"
         :selectConfig="selectConfig"
         :table-events="{
           //element talbe事件都能传
@@ -396,6 +397,75 @@ const paymentStatus = ref([
     value: "20",
   },
 ]);
+const statConfig = computed(() => [
+  {
+    label: "",
+    data: [
+      //一个卡牌多数据配置
+      {
+        label: "合计",
+        type: 2,
+        data: [
+          {
+            label: "订单数",
+            num: 100000.0,
+            color: "#C280FF",
+          },
+          {
+            label: "采购金额",
+            num: 100000.0,
+            color: "#C280FF",
+          },
+        ],
+      },
+      {
+        label: "未到货",
+        data: [
+          {
+            label: "订单数",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+          {
+            label: "采购金额",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+        ],
+      },
+      {
+        label: "部分到货",
+        data: [
+          {
+            label: "订单数",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+          {
+            label: "采购金额",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+        ],
+      },
+      {
+        label: "已到货",
+        data: [
+          {
+            label: "订单数",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+          {
+            label: "采购金额",
+            num: 100000.0,
+            color: "#0084FF",
+          },
+        ],
+      },
+    ],
+  },
+]);
 const selectConfig = reactive([
   {
     label: "采购状态",
@@ -524,7 +594,7 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              handleEdit(row, 88);
+              handleEditOne(row);
             },
           },
           {
@@ -680,6 +750,25 @@ const handleEdit = (row, status) => {
   });
 };
 
+const handleEditOne = (row) => {
+  const data = { id: row.id, purchaseStatus: 88 };
+  // 弹窗提示是否删除
+  ElMessageBox.confirm(`此操作将作废该数据, 是否继续?`, "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  }).then(() => {
+    // 删除
+    proxy.post("/sale/purchase/cancellation", data).then((res) => {
+      ElMessage({
+        message: `作废成功`,
+        type: "success",
+      });
+      getList();
+    });
+  });
+};
+
 const supplierData = ref([]);
 const productUnit = ref([]);
 const getDict = async (req) => {

+ 11 - 9
src/views/purchaseManage/purchaseManage/handoverSlipOne/index.vue

@@ -103,12 +103,15 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
-    status: "15",
+    isReceived: "",
+    dataType: "",
+    purchaseStatus: "",
   },
 });
-const isReceivedArr = ref([
-  { label: "是", value: "1" },
-  { label: "否", value: "0" },
+const purchaseStatus = ref([
+  { label: "未采购", value: "0" },
+  { label: "部分采购", value: "1" },
+  { label: "已采购", value: "2" },
 ]);
 const corporationArr = ref([]);
 const selectConfig = computed(() => [
@@ -119,8 +122,8 @@ const selectConfig = computed(() => [
   },
   {
     label: "采购状态",
-    prop: "isReceived",
-    data: isReceivedArr.value,
+    prop: "purchaseStatus",
+    data: purchaseStatus.value,
   },
 ]);
 const config = computed(() => {
@@ -157,7 +160,6 @@ const config = computed(() => {
         prop: "userName",
       },
     },
-
     {
       attrs: {
         label: "产品编码",
@@ -173,7 +175,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "规格型号",
-        prop: "productName",
+        prop: "productSpec",
       },
     },
     {
@@ -189,7 +191,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "销售数量",
-        prop: "expendQuantity",
+        prop: "quantity",
         width: "110",
       },
     },