Răsfoiți Sursa

Merge branch 'dev0.3' of http://36.137.93.232:3000/hf/byte-sailing-new into dev0.3

lxf 1 an în urmă
părinte
comite
d23036e1b4

+ 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

+ 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",
       },
     },