cz 2 ani în urmă
părinte
comite
072882ac2d

+ 1 - 0
src/App.vue

@@ -17,6 +17,7 @@ export default {
     getBusinessDict({ current: 1, size: 999 }).then(
       (res) => {
         const list = res.data.data;
+        console.log(list, "aaa");
         window.localStorage.setItem("businessDict", JSON.stringify(list));
       },
       (err) => {

+ 4 - 11
src/api/product-material/material/index.js

@@ -37,20 +37,13 @@ export function materialClassifyDel(data = {}) {
 // 物料列表 
 export function materialList(data = {}) {
   return request({
-    url: '/api/victoriatourist/material/page',
+    url: '/api/victoriatourist/productInfo/page',
     method: 'post',
     data: data,
   })
 }
 
-// 物料条数 
-export function materialCount(data = {}) {
-  return request({
-    url: '/api/victoriatourist/material/page',
-    method: 'post',
-    data: data,
-  })
-}
+
 
 // 物料详情
 export function materialDetails(data = {}) {
@@ -65,7 +58,7 @@ export function materialDetails(data = {}) {
 // 添加物料 
 export function materialAdd(data = {}) {
   return request({
-    url: '/api/victoriatourist/material/add',
+    url: '/api/victoriatourist/productInfo/add',
     method: 'post',
     data: data,
   })
@@ -74,7 +67,7 @@ export function materialAdd(data = {}) {
 // 编辑物料 
 export function materialEdit(data = {}) {
   return request({
-    url: '/api/victoriatourist/material/edit',
+    url: '/api/victoriatourist/productInfo/edit',
     method: 'post',
     data: data,
   })

+ 8 - 0
src/api/system/common.js

@@ -1,5 +1,13 @@
 import request from '@/router/axios';
 
+export function getFileData(data) {
+  return request({
+    url: '/api/service-file/getFileList',
+    method: 'post',
+    data: data
+  })
+}
+
 export function getDeptData(data) {
   return request({
     url: '/api/victoriatourist/common/dept/tree',

+ 2 - 1
src/components/inbound-outbound/addOutbound.vue

@@ -77,6 +77,7 @@
                 v-model="form.type"
                 placeholder="请选择"
                 style="width: 100%"
+                disabled
               >
                 <el-option
                   v-for="item in outboundTypeList"
@@ -264,7 +265,7 @@ export default {
   created() {
     getLogisticsData({ keyword: "" }).then(
       (res) => {
-        this.logisticsData = res.data.data.filter((x, y) => y < 100);
+        this.logisticsData = res.data.data;
       },
       (err) => {
         console.log("getDeptData:" + err);

+ 0 - 1
src/router/page/index.js

@@ -227,7 +227,6 @@ export default [
       },
     ],
   },
-
   {
     path: '/product-material/supply',
     component: Layout,

+ 1 - 1
src/views/inbound-outbound/outbound/salesOutbound/index.vue

@@ -119,7 +119,7 @@ export default {
               customerName: row.customerName,
               orderType: String(row.type),
               orderCode: row.code,
-              type: "",
+              type: "4",
               orderId: row.id,
               warehouseId: "",
               logisticsCode: "",

+ 20 - 12
src/views/order-management/order/addOrder.vue

@@ -71,9 +71,11 @@
         </el-form-item>
         <el-form-item>
           <el-table :data="form.orderDetailsList" v-if="JDorder">
-            <el-table-column label="产品编码" prop="code"> </el-table-column>
-            <el-table-column label="产品名称" prop="name"> </el-table-column>
-            <el-table-column label="单价" prop="price">
+            <el-table-column label="产品编码" prop="code" width="120">
+            </el-table-column>
+            <el-table-column label="产品名称" prop="name" width="180">
+            </el-table-column>
+            <el-table-column label="单价" prop="price" width="120">
               <template slot-scope="scope">
                 <el-form-item
                   :prop="'orderDetailsList.' + scope.$index + '.price'"
@@ -92,7 +94,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="数量" prop="quantity">
+            <el-table-column label="数量" prop="quantity" width="120">
               <template slot-scope="scope">
                 <el-form-item
                   :prop="'orderDetailsList.' + scope.$index + '.quantity'"
@@ -114,7 +116,8 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="小计" prop="subtotal"> </el-table-column>
+            <el-table-column label="小计" prop="subtotal" width="140">
+            </el-table-column>
             <el-table-column label="备注" prop="remark">
               <template slot-scope="scope">
                 <el-form-item
@@ -142,9 +145,11 @@
             </el-table-column>
           </el-table>
           <el-table :data="form.orderDetailsList" v-else>
-            <el-table-column label="产品编码" prop="code"> </el-table-column>
-            <el-table-column label="产品名称" prop="name"> </el-table-column>
-            <el-table-column label="单价" prop="price">
+            <el-table-column label="产品编码" prop="code" width="120">
+            </el-table-column>
+            <el-table-column label="产品名称" prop="name" width="180">
+            </el-table-column>
+            <el-table-column label="单价" prop="price" width="120">
               <template slot-scope="scope">
                 <el-form-item
                   :prop="'orderDetailsList.' + scope.$index + '.price'"
@@ -163,7 +168,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="数量" prop="quantity">
+            <el-table-column label="数量" prop="quantity" width="120">
               <template slot-scope="scope">
                 <el-form-item
                   :prop="'orderDetailsList.' + scope.$index + '.quantity'"
@@ -185,7 +190,8 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="小计" prop="subtotal"> </el-table-column>
+            <el-table-column label="小计" prop="subtotal" width="140">
+            </el-table-column>
             <el-table-column label="备注" prop="remark">
               <template slot-scope="scope">
                 <el-form-item
@@ -535,14 +541,16 @@ export default {
     totalAmount() {
       if (this.JDorder) {
         this.form.orderDetailsList.forEach((x) => {
-          x.subtotal = (x.quantity * (Number(x.price) * 100)) / 100;
+          let sum0 = x.quantity || 0;
+          x.subtotal = (sum0 * (Number(x.price) * 100)) / 100;
         });
         this.form.money = this.form.orderDetailsList.reduce((sum, x) => {
           return sum + Number(x.subtotal);
         }, 0);
       } else {
         this.form.orderDetailsList.forEach((x) => {
-          x.subtotal = (x.quantity * (Number(x.price) * 100)) / 100;
+          let sum0 = x.quantity || 0;
+          x.subtotal = (sum0 * (Number(x.price) * 100)) / 100;
         });
         this.form.money = this.form.orderDetailsList.reduce((sum, x) => {
           return sum + Number(x.subtotal);

+ 2 - 2
src/views/product-material/material/addMaterial.vue

@@ -42,8 +42,8 @@
               <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
-            <el-form-item label=".">
+          <el-col :span="18" style="margin-top: 30px">
+            <el-form-item label=" ">
               <span>不输入则自动生成,自动编码规则示例:M00001</span>
             </el-form-item>
           </el-col>

+ 23 - 21
src/views/product-material/material/index.vue

@@ -208,6 +208,7 @@ export default {
         code: "",
         name: "",
         deptId: "",
+        definition: "1",
       },
       tableList: [],
       total: 0,
@@ -278,7 +279,11 @@ export default {
         pageSize: 10,
         keyword: "",
         classifyId: "",
+        type: "",
+        code: "",
+        name: "",
         deptId: "",
+        definition: "1",
       };
     },
     handleQuery() {
@@ -289,6 +294,7 @@ export default {
       this.loading = true;
       API.materialList(this.req).then(
         (res) => {
+          console.log(res, "aaaa");
           this.tableList = res.data.data.records;
           this.total = res.data.data.total;
           this.loading = false;
@@ -298,14 +304,6 @@ export default {
           this.loading = false;
         }
       );
-      // API.materialCount(this.req).then(
-      //   (res) => {
-      //     this.total = res.data.data.count;
-      //   },
-      //   (err) => {
-      //     console.log("materialCount: " + err);
-      //   }
-      // );
     },
     materialAdd() {
       this.titleText = "add";
@@ -317,25 +315,29 @@ export default {
         unit: "",
         introduce: "",
         deptId: "",
+        definition: "1",
       };
       this.open = true;
     },
     handleEdit(row) {
       this.titleText = "edit";
       this.open = true;
-      this.$nextTick(() => {
-        this.$refs.addMaterial.loading = true;
-        API.materialDetails({ id: row.id }).then(
-          (res) => {
-            this.form = res.data.data;
-            this.form.type = this.form.type + "";
-            this.$refs.addMaterial.loading = false;
-          },
-          (err) => {
-            console.log(err);
-          }
-        );
-      });
+      this.form = JSON.parse(JSON.stringify(row));
+      this.form.type = this.form.type + "";
+      // this.$nextTick(() => {
+      //   this.$refs.addMaterial.loading = true;
+      //   API.materialDetails({ id: row.id }).then(
+      //     (res) => {
+      //       this.form = res.data.data;
+      //       this.form.type = this.form.type + "";
+
+      //       this.$refs.addMaterial.loading = false;
+      //     },
+      //     (err) => {
+      //       console.log(err);
+      //     }
+      //   );
+      // });
     },
     handleDelete(row) {
       this.$confirm("请问是否删除该条数据 ?", {

+ 87 - 8
src/views/product-material/product/addProduct.vue

@@ -28,7 +28,7 @@
             >
           </el-radio-group>
         </el-form-item>
-        <el-row :gutter="10">
+        <el-row :gutter="10" v-if="isEdit !== 'edit'">
           <el-col :span="6">
             <el-form-item label="产品编码" prop="code">
               <el-input v-model="form.code" placeholder="请输入"></el-input>
@@ -110,7 +110,7 @@
           </el-col>
         </el-row>
         <el-form-item label="产品照片">
-          <el-upload
+          <!-- <el-upload
             class="upload-demo"
             action="/api/service-file/uploadFile"
             :headers="uploadHeader"
@@ -121,6 +121,31 @@
             :on-remove="handleRemove"
           >
             <i class="el-icon-plus"></i>
+          </el-upload> -->
+          <el-upload
+            class="avatar-uploader"
+            action="/api/service-file/uploadFile"
+            :headers="uploadHeader"
+            :show-file-list="false"
+            :before-upload="beforeAvatarUpload"
+            :on-progress="mainPictureProgress"
+            :on-success="mainPictureSuccess"
+            :on-error="mainPictureError"
+            accept=".jpg, .png, .jpeg"
+          >
+            <div v-loading="loadingImage">
+              <img
+                v-if="imgUrl"
+                :src="imgUrl"
+                style="max-width: 150px; max-height: 150px"
+                fit="scale-down"
+              />
+              <i
+                v-else
+                class="el-icon-plus el-upload el-upload--picture-card"
+                style="font-size: 28px; color: #8c939d"
+              ></i>
+            </div>
           </el-upload>
         </el-form-item>
         <el-form-item label="是否组合" prop="combination">
@@ -261,6 +286,13 @@ export default {
       type: Object,
       default: () => {},
     },
+    fileData1: {
+      type: Object,
+      default: () => {},
+    },
+    isEdit: {
+      type: String,
+    },
   },
   data() {
     return {
@@ -272,7 +304,6 @@ export default {
       selectList: [],
       productTypeList: [],
       productUnitList: [],
-      fileList: [],
       formRules: {
         classifyId: [
           {
@@ -325,6 +356,9 @@ export default {
         ],
       },
       selectDialog: false,
+      loadingImage: false,
+      imgUrl: "",
+      fileData: {},
     };
   },
   created() {
@@ -353,6 +387,21 @@ export default {
       }
     );
   },
+  mounted() {
+    this.fileData = this.fileData1;
+    // if (this.form.fileInfoList && this.form.fileInfoList.length > 0) {
+    //   this.fileList = this.form.fileInfoList;
+    // }
+  },
+  watch: {
+    fileData: {
+      handler(val) {
+        if (val) {
+          this.fileData = this.fileData1;
+        }
+      },
+    },
+  },
   methods: {
     handleTimeChange() {
       if (this.form.clearancePeriod) {
@@ -367,11 +416,9 @@ export default {
           this.loading = true;
           this.form.classifyId =
             this.form.classifyId[this.form.classifyId.length - 1];
-          this.form.fileInfoList = this.fileList.map((x) => {
-            return {
-              ...x.response.data,
-            };
-          });
+          const arr = [];
+          arr.push(this.fileData);
+          this.form.fileInfoList = arr;
 
           this.$emit("submit");
         }
@@ -408,6 +455,19 @@ export default {
       this.fileList = fileList;
     },
     handlePreview() {},
+    beforeAvatarUpload(file) {},
+    // 主图
+    mainPictureProgress() {
+      this.loadingImage = true;
+    },
+    mainPictureSuccess(response) {
+      this.fileData = response.data;
+      this.imageUrl = this.fileData.filePath;
+      this.loadingImage = false;
+    },
+    mainPictureError() {
+      this.loadingImage = false;
+    },
     handleFocus() {
       this.$nextTick(() => {
         const dom0 = document.querySelector(".el-date-picker__prev-btn");
@@ -437,4 +497,23 @@ export default {
     padding: 8px 0 0 0;
   }
 }
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  background-color: #f9f9f9;
+  width: 148px;
+  height: 148px;
+  line-height: 148px;
+  text-align: center;
+}
 </style>

+ 33 - 18
src/views/product-material/product/index.vue

@@ -122,6 +122,8 @@
           >
             <add-product
               :form="form"
+              :fileData1="fileData"
+              :isEdit="titleText"
               @submit="handleSubmit"
               @cancel="handleCancel"
               ref="addProduct"
@@ -341,7 +343,7 @@ import test from "@/components/form-test/index.vue";
 
 import * as API from "@/api/product-material/product/index.js";
 
-import { getDeptData } from "@/api/system/common.js";
+import { getDeptData, getFileData } from "@/api/system/common.js";
 
 export default {
   name: "product",
@@ -380,6 +382,7 @@ export default {
         beginTime: null,
         endTime: null,
         productSpuId: "",
+        definition: "2",
       },
       tableList: [],
       total: 0,
@@ -422,9 +425,11 @@ export default {
         matureExpectedSales: "",
         clearancePeriod: "",
         productCombinationList: [],
+        definition: "2",
       },
       queryDialog: false,
       timeArr: [],
+      fileData: {},
     };
   },
   created() {
@@ -491,6 +496,8 @@ export default {
         endTime: null,
         productSpuId: "",
         warehouseId: "",
+        definition: "2",
+        fileInfoList: [],
       };
       this.timeArr = [];
       this.getList();
@@ -547,6 +554,8 @@ export default {
         matureExpectedSales: "",
         clearancePeriod: "",
         productCombinationList: [],
+        definition: "2",
+        fileInfoList: [],
       };
       this.open = true;
     },
@@ -555,24 +564,30 @@ export default {
       this.titleText = "edit";
       this.open = true;
       const data = { ...row };
-      if (row.combination === 1) {
-        this.$nextTick(() => {
-          this.$refs.addProduct.loading = true;
-          API.getCombination({ id: row.id }).then((res) => {
-            this.form = data;
-            this.form.newProductsDay1 = Number(this.form.newProductsDay) + 1;
-            this.form.growUpDay1 = this.form.growUpDay;
-            this.form.combination = this.form.combination + "";
-            this.form.productCombinationList = [...res.data.data.records];
-            this.$refs.addProduct.loading = false;
+      getFileData({ businessId: row.id }).then((file) => {
+        if (file.data.data.length > 0) {
+          this.fileData = file.data.data[0];
+        }
+
+        if (row.combination === 1) {
+          this.$nextTick(() => {
+            this.$refs.addProduct.loading = true;
+            API.getCombination({ id: row.id }).then((res) => {
+              this.form = data;
+              this.form.newProductsDay1 = Number(this.form.newProductsDay) + 1;
+              this.form.growUpDay1 = this.form.growUpDay;
+              this.form.combination = this.form.combination + "";
+              this.form.productCombinationList = [...res.data.data.records];
+              this.$refs.addProduct.loading = false;
+            });
           });
-        });
-      } else {
-        this.form = data;
-        this.form.productCombinationList = [];
-        this.form.newProductsDay1 = Number(this.form.newProductsDay) + 1;
-        this.form.growUpDay1 = this.form.growUpDay;
-      }
+        } else {
+          this.form = data;
+          this.form.productCombinationList = [];
+          this.form.newProductsDay1 = Number(this.form.newProductsDay) + 1;
+          this.form.growUpDay1 = this.form.growUpDay;
+        }
+      });
     },
     handleDelete(row) {
       this.$confirm("请问是否删除该条数据 ?", {

+ 4 - 1
src/views/product-material/spu/addSpu.vue

@@ -8,7 +8,7 @@
         ref="form"
         label-width="100px"
       >
-        <el-row :gutter="10">
+        <el-row :gutter="10" v-if="isEdit !== 'edit'">
           <el-col :span="6">
             <el-form-item label="spu编码" prop="code">
               <el-input v-model="form.code" placeholder="请输入"></el-input>
@@ -91,6 +91,9 @@ export default {
       type: Object,
       default: () => {},
     },
+    isEdit: {
+      type: String,
+    },
   },
   data() {
     return {

+ 1 - 0
src/views/product-material/spu/index.vue

@@ -50,6 +50,7 @@
     >
       <add-spu
         :form="form"
+        :isEdit="titleText"
         @submit="handleSubmit"
         @cancel="handleCancel"
         ref="addSpu"

+ 4 - 0
src/views/product-material/supply/addSupplyPrice.vue

@@ -13,6 +13,7 @@
             v-model="form.supplierId"
             placeholder="请选择"
             style="width: 100%"
+            :disabled="isEdit === 'edit'"
           >
             <el-option
               v-for="item in supplySelectList"
@@ -92,6 +93,9 @@ export default {
       type: Array,
       default: () => [],
     },
+    isEdit: {
+      type: String,
+    },
   },
   data() {
     return {

+ 6 - 3
src/views/product-material/supply/priceMaintenance.vue

@@ -23,7 +23,9 @@
         >
           <template slot-scope="scope">
             <span v-for="i in supplyTypeList" :key="i.dictKey">
-              <span v-if="scope.row.supplierType == i.dictKey">{{ i.dictValue }}</span>
+              <span v-if="scope.row.supplierType == i.dictKey">{{
+                i.dictValue
+              }}</span>
             </span>
           </template>
         </el-table-column>
@@ -78,6 +80,7 @@
       >
         <add-supply-price
           :form="form"
+          :isEdit="titleText"
           :supplySelectList="supplySelectList"
           @submit="handleSubmit"
           @cancel="handleCancel"
@@ -219,7 +222,7 @@ export default {
         materialCode: "",
         materialType: "",
       },
-      
+
       btnForm: {
         otherButton: {
           list: [
@@ -284,7 +287,7 @@ export default {
     this.supplyTypeList = businessDictData.find(
       (item) => item.code === "supplyType"
     ).children;
-    console.log(this.supplyTypeList)
+    console.log(this.supplyTypeList);
     this.selectConfig[1].data = this.supplyTypeList.map((item) => ({
       label: item.dictValue,
       value: item.dictKey,

+ 1 - 1
src/views/product-material/warehouse/index.vue

@@ -140,7 +140,7 @@ export default {
       label: item.dictValue,
       value: item.dictKey,
     }));
-    API.getListByRole({ roleId: '1620698154897735682' }).then((res) => {
+    API.getListByRole({ roleId: "1620698154897735682" }).then((res) => {
       this.customerSelectList = res.data.data;
     });
     this.getList();

+ 47 - 22
src/views/purchase-management/deliver-goods/index.vue

@@ -67,6 +67,7 @@ export default {
       },
 
       selectData: [],
+      logisticsData: [],
     };
   },
   created() {
@@ -77,7 +78,7 @@ export default {
       (item) => item.code === "purchaseStatus"
     ).children;
     this.selectConfig[0].data = this.purchaseStatusList
-      .filter((x) => Number(x.dictKey) > 20)
+      .filter((x) => Number(x.dictKey) > 2)
       .map((item) => ({
         label: item.dictValue,
         value: item.dictKey,
@@ -113,10 +114,12 @@ export default {
     },
     handleSend(row) {
       this.form = {
-        businessId: "",
+        businessId: row.id,
         businessType: "1",
         logisticsCompanyCode: "",
         code: "",
+        puCode: row.code,
+        supplierName: row.supplierName,
         details: [],
         fileInfos: [],
       };
@@ -124,9 +127,16 @@ export default {
       this.open = true;
       this.$nextTick(() => {
         this.$refs.sendGoods.loading = true;
-        API.logisticsSelectData({ id: row.id }).then(
+        API.purchaseDetails({ id: row.id }).then(
           (res) => {
-            console.log(res, "aa");
+            this.form.details = res.data.data.goodsList.map((x) => ({
+              goodsCode: x.goodsCode,
+              goodsName: x.goodsName,
+              quantity: x.quantity,
+              purchaseId: row.id,
+              applyPurchaseId: x.id,
+              shipmentQuantity: "",
+            }));
             this.$refs.sendGoods.loading = false;
           },
           (err) => {
@@ -134,6 +144,18 @@ export default {
           }
         );
       });
+      // this.$nextTick(() => {
+      //   this.$refs.sendGoods.loading = true;
+      //      API.logisticsSelectData({ id: row.id }).then(
+      //     (res) => {
+      //       console.log(res, "aa");
+      //       this.$refs.sendGoods.loading = false;
+      //     },
+      //     (err) => {
+      //       this.$refs.sendGoods.loading = false;
+      //     }
+      //   );
+      // });
     },
 
     handleCancel() {
@@ -163,18 +185,21 @@ export default {
       );
     },
     handleArrive(row) {
+      API.logisticsSelectData({ id: row.id }).then(
+        (res) => {
+          this.logisticsData = res.data.data;
+        },
+        (err) => {
+          console.log("logisticsSelectData: " + err);
+        }
+      );
       this.titleText = "到货通知";
       this.openArrive = true;
-      // this.$confirm('是否确认此操作 ?', {
-      //   confirmButtonText: '确定',
-      //   cancelButtonText: '取消',
-      //   type: "warning",
-      // }).then(() => {
-      //   API.completePurchase({ id: row.id }).then(() => {
-      //     this.msgSuccess('删除成功');
-      //     this.getList();
-      //   });
-      // });
+      this.arriveForm = {
+        code: row.code,
+        supplierName: row.supplierName,
+        id: "",
+      };
     },
     handlePurchaseEnd(row) {
       this.$confirm("是否确定此操作 ?", {
@@ -261,7 +286,7 @@ export default {
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="供应商" align="left" prop="price" />
+        <el-table-column label="供应商" align="left" prop="supplierName" />
         <el-table-column
           label="采购总金额"
           align="left"
@@ -286,12 +311,12 @@ export default {
           width="120"
           :formatter="(row) => dictDataEcho(row.status, purchaseStatusList)"
         />
-        <el-table-column
+        <!-- <el-table-column
           label="付款状态"
           align="left"
           prop="createName"
           width="120"
-        />
+        /> -->
         <el-table-column label="操作" align="center" width="240">
           <template slot-scope="scope">
             <el-button type="text" @click="handleSend(scope.row)">
@@ -358,9 +383,9 @@ export default {
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item label="供应商" prop="name">
+        <el-form-item label="供应商" prop="supplierName">
           <el-input
-            v-model="arriveForm.name"
+            v-model="arriveForm.supplierName"
             placeholder="请输入"
             disabled
           ></el-input>
@@ -375,9 +400,9 @@ export default {
               >
                 <el-option
                   v-for="item in logisticsData"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
+                  :key="item.id"
+                  :label="item.code"
+                  :value="item.id"
                 >
                 </el-option>
               </el-select>

+ 20 - 7
src/views/purchase-management/deliver-goods/sendGoods.vue

@@ -10,18 +10,18 @@
       >
         <el-row :gutter="10">
           <el-col :span="4">
-            <el-form-item label="采购单号" prop="code">
+            <el-form-item label="采购单号" prop="puCode">
               <el-input
-                v-model="form.code"
+                v-model="form.puCode"
                 placeholder="请输入"
                 disabled
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="供应商" prop="code">
+            <el-form-item label="供应商" prop="supplierName">
               <el-input
-                v-model="form.code"
+                v-model="form.supplierName"
                 placeholder="请输入"
                 disabled
               ></el-input>
@@ -47,9 +47,9 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label=". " prop="logisticsCode">
+            <el-form-item label=" " prop="code">
               <el-input
-                v-model="form.logisticsCode"
+                v-model="form.code"
                 placeholder="物流/快递单号"
               ></el-input>
             </el-form-item>
@@ -117,6 +117,7 @@
 import labelTitle from "@/components/label-title/index.vue";
 
 import { getToken } from "@/util/auth";
+import { getLogisticsData } from "@/api/system/common.js";
 
 export default {
   name: "addPurchase",
@@ -143,6 +144,13 @@ export default {
             trigger: "blur",
           },
         ],
+        logisticsCompanyCode: [
+          {
+            required: true,
+            message: "请选择物流信息",
+            trigger: "change",
+          },
+        ],
         shipmentQuantity: [
           {
             required: true,
@@ -151,9 +159,14 @@ export default {
           },
         ],
       },
+      logisticsData: [],
     };
   },
-  created() {},
+  created() {
+    getLogisticsData({ keyword: "" }).then((res) => {
+      this.logisticsData = res.data.data;
+    });
+  },
   methods: {
     handleSubmit() {
       this.$refs.form.validate((valid) => {

+ 3 - 3
src/views/purchase-management/purchase/addPurchase.vue

@@ -60,7 +60,8 @@
               :formatter="(row) => dictDataEcho(row.goodsType, productTypeList)"
             >
             </el-table-column>
-            <el-table-column label="单位12312312" prop="goodsUnit"> </el-table-column>
+            <el-table-column label="单位12312312" prop="goodsUnit">
+            </el-table-column>
 
             <el-table-column label="采购数量" prop="quantity">
             </el-table-column>
@@ -85,7 +86,7 @@
             </el-table-column>
             <el-table-column label="小计" prop="sum">
               <template slot-scope="scope">
-                <span>{{ scope.row.unitPrice * scope.row.quantity  }}</span>
+                <span>{{ scope.row.unitPrice * scope.row.quantity }}</span>
               </template>
             </el-table-column>
 
@@ -114,7 +115,6 @@ import labelTitle from "@/components/label-title/index.vue";
 import * as API from "@/api/purchase-management/purchase/index.js";
 import { getToken } from "@/util/auth";
 
-
 export default {
   name: "addPurchase",
   components: { labelTitle },

+ 4 - 6
src/views/purchase-management/purchase/index.vue

@@ -94,12 +94,10 @@ export default {
     this.purchaseStatusList = businessDictData.find(
       (item) => item.code === "purchaseStatus"
     ).children;
-    this.selectConfig[0].data = this.purchaseStatusList
-      .filter((x) => x.dictKey === "10" || x.dictKey === "20")
-      .map((item) => ({
-        label: item.dictValue,
-        value: item.dictKey,
-      }));
+    this.selectConfig[0].data = this.purchaseStatusList.map((item) => ({
+      label: item.dictValue,
+      value: item.dictKey,
+    }));
 
     this.supplyTypeList = businessDictData.find(
       (item) => item.code === "supplyType"

+ 2 - 2
vue.config.js

@@ -48,8 +48,8 @@ module.exports = {
     proxy: {
       '/api': {
         //本地服务接口地址
-        //target: 'http://36.134.91.96:10001/api',
-        target: 'https://cfm.bytesail.cn/api',
+        target: 'http://36.134.91.96:10001/api',
+        // target: 'https://cfm.bytesail.cn/api',
         //远程演示服务地址,可用于直接启动项目
         //target: 'https://saber.bladex.vip/api',
         ws: true,