Browse Source

采购入库、手动入库已完成,基础模块相关模块列表样式调整

cz 2 years ago
parent
commit
2f678bf284
44 changed files with 1957 additions and 975 deletions
  1. 9 0
      src/api/inbound-outbound/inbound/manualInbound.js
  2. 10 1
      src/api/inbound-outbound/inbound/purchaseInbound.js
  3. 8 0
      src/components/inbound-outbound/addInbound.vue
  4. 43 2
      src/components/inbound-outbound/addOutbound.vue
  5. 26 0
      src/router/page/index.js
  6. 8 0
      src/views/inbound-outbound/abnormalManage/addInspection.vue
  7. 8 0
      src/views/inbound-outbound/arrivalInspection/addInspection.vue
  8. 8 0
      src/views/inbound-outbound/inbound/addInbound.vue
  9. 85 52
      src/views/inbound-outbound/inbound/cgInbound/index.vue
  10. 25 17
      src/views/inbound-outbound/inbound/cgInbound/purchaseInbound.vue
  11. 43 78
      src/views/inbound-outbound/inbound/manualInbound/addManualInbound.vue
  12. 50 25
      src/views/inbound-outbound/inbound/manualInbound/index.vue
  13. 8 0
      src/views/inbound-outbound/outbound/addOutbound.vue
  14. 8 0
      src/views/inbound-outbound/outbound/manualOutbound/addManualOutbound.vue
  15. 8 0
      src/views/inbound-outbound/outbound/salesOutbound/addOutbound.vue
  16. 7 1
      src/views/inbound-outbound/outbound/salesOutbound/index.vue
  17. 8 0
      src/views/inbound-outbound/transfer/sendTransfer.vue
  18. 8 0
      src/views/inventory-management/check/sendCheck.vue
  19. 221 0
      src/views/inventory-management/combination/addCombination.vue
  20. 268 0
      src/views/inventory-management/combination/index.vue
  21. 8 0
      src/views/order-management/afterSales/addAfterSales.vue
  22. 8 0
      src/views/order-management/order/addOrder.vue
  23. 31 63
      src/views/product-material/customer/addCustomer.vue
  24. 26 26
      src/views/product-material/customer/index.vue
  25. 15 15
      src/views/product-material/material/addMaterial.vue
  26. 36 46
      src/views/product-material/material/index.vue
  27. 13 17
      src/views/product-material/material/tree.vue
  28. 91 142
      src/views/product-material/product/addProduct.vue
  29. 53 55
      src/views/product-material/product/index.vue
  30. 13 17
      src/views/product-material/product/tree.vue
  31. 26 49
      src/views/product-material/spu/addSpu.vue
  32. 29 42
      src/views/product-material/spu/index.vue
  33. 47 132
      src/views/product-material/supply/addSupply.vue
  34. 24 37
      src/views/product-material/supply/addSupplyPrice.vue
  35. 39 48
      src/views/product-material/supply/index.vue
  36. 40 49
      src/views/product-material/supply/priceMaintenance.vue
  37. 21 31
      src/views/product-material/warehouse/addWarehouse.vue
  38. 20 30
      src/views/product-material/warehouse/index.vue
  39. 8 0
      src/views/purchase-management/deliver-goods/sendGoods.vue
  40. 8 0
      src/views/purchase-management/purchase/addPurchase.vue
  41. 257 0
      src/views/purchase-management/returnsManagement/addReturnsGoods.vue
  42. 269 0
      src/views/purchase-management/returnsManagement/index.vue
  43. 8 0
      src/views/purchase-management/settlement/sendPurchaseSettlement.vue
  44. 8 0
      src/views/purchase-management/subscribe/sendSubscribe.vue

+ 9 - 0
src/api/inbound-outbound/inbound/manualInbound.js

@@ -1,5 +1,14 @@
 import request from '@/router/axios'
 
+// 手动入库列表
+export function manualInboundList(data = {}) {
+  return request({
+    url: '/api/victoriatourist/manual/in/stock/page',
+    method: 'post',
+    data: data,
+  })
+}
+
 // 手动入库 
 export function manualAdd(data = {}) {
   return request({

+ 10 - 1
src/api/inbound-outbound/inbound/purchaseInbound.js

@@ -3,7 +3,16 @@ import request from '@/router/axios'
 // 采购入库列表 
 export function purchaseInboundList(data = {}) {
   return request({
-    url: '/api/victoriatourist/applyIn/page',
+    url: '/api/victoriatourist/purchase/in/stock/page',
+    method: 'post',
+    data: data,
+  })
+}
+
+// 物流单明细
+export function logisticsDetails(data = {}) {
+  return request({
+    url: '/api/victoriatourist/purchase/in/stock/logistics/details',
     method: 'post',
     data: data,
   })

+ 8 - 0
src/components/inbound-outbound/addInbound.vue

@@ -333,4 +333,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

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

@@ -14,7 +14,7 @@
               <el-input v-model="form.customerName" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="4">
+          <el-col :span="4" v-if="addType !== '10'">
             <el-form-item label="订单类型" required>
               <el-select
                 v-model="form.orderType"
@@ -32,6 +32,19 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="4" v-if="addType === '10'">
+            <el-form-item label="订单编号">
+              <el-input v-model="form.orderCode" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4" v-if="addType === '10'">
+            <el-button
+              type="text"
+              @click="handleOutbound(scope.row)"
+              style="margin-top: 52px"
+              >产看订单
+            </el-button>
+          </el-col>
         </el-row>
 
         <el-row :gutter="10">
@@ -59,7 +72,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="出库类型" prop="type">
+            <el-form-item label="出库类型" prop="type" v-if="addType !== '10'">
               <el-select
                 v-model="form.type"
                 :placeholder="$t('pleaseSelect')"
@@ -74,6 +87,22 @@
                 </el-option>
               </el-select>
             </el-form-item>
+            <el-form-item label="补发类型" required v-if="addType === '10'">
+              <el-select
+                v-model="form.orderType"
+                :placeholder="$t('pleaseSelect')"
+                style="width: 100%"
+                disabled
+              >
+                <el-option
+                  v-for="item in orderTypeList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
           </el-col>
         </el-row>
 
@@ -178,6 +207,10 @@ export default {
       type: Object,
       default: () => {},
     },
+    addType: {
+      type: String,
+      default: "",
+    },
     orderTypeList: {
       type: Array,
       default: () => [],
@@ -276,4 +309,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

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

@@ -294,6 +294,19 @@ export default [
     ],
   },
   {
+    path: '/purchase-management/returnsManagement',
+    component: Layout,
+    redirect: '/purchase-management/returnsManagement/index',
+    children: [
+      {
+        path: 'index',
+        name: '退货管理',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/purchase-management/returnsManagement/index'),
+        props: true,
+      },
+    ],
+  },
+  {
     path: '/purchase-management/settlement',
     component: Layout,
     redirect: '/purchase-management/settlement/purchaseSettlement',
@@ -372,6 +385,19 @@ export default [
     ],
   },
   {
+    path: '/inventory-management/combination',
+    component: Layout,
+    redirect: '/inventory-management/combination/index',
+    children: [
+      {
+        path: 'index',
+        name: '产品组合',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/inventory-management/combination/index'),
+        props: true,
+      },
+    ],
+  },
+  {
     path: '/inbound-outbound/inbound',
     component: Layout,
     redirect: '/inbound-outbound/inbound/index',

+ 8 - 0
src/views/inbound-outbound/abnormalManage/addInspection.vue

@@ -180,4 +180,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/inbound-outbound/arrivalInspection/addInspection.vue

@@ -216,4 +216,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/inbound-outbound/inbound/addInbound.vue

@@ -333,4 +333,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 85 - 52
src/views/inbound-outbound/inbound/cgInbound/index.vue

@@ -4,7 +4,7 @@
 import test from "@/components/form-test/index.vue";
 import query from "@/components/query/index.vue";
 import purchaseInbound from "./purchaseInbound.vue";
-import * as API from "@/api/inbound-outbound/inbound/index.js";
+import * as API from "@/api/inbound-outbound/inbound/purchaseInbound.js";
 import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
 
 export default {
@@ -43,31 +43,20 @@ export default {
         pageNum: 1,
         pageSize: 10,
         keyword: "",
-        warehouseId: "",
-        status: "",
-        code: "",
-        goodsCode: "",
-        goodsName: "",
-        applyUserId: "",
-        startTime: "",
-        endTime: "",
+        inStockStatus: "",
       },
       selectConfig: [
         {
-          label: "收获仓库",
-          prop: "type",
-          data: [],
-        },
-        {
           label: "入库状态",
-          prop: "type",
+          prop: "inStockStatus",
           data: [
-            { label: "已完成", value: "1" },
-            { label: "未完成", value: "2" },
+            { label: "未入库", value: "10" },
+            { label: "部分入库", value: "20" },
           ],
         },
       ],
-      tableList: [{}],
+      tableList: [],
+      total: 0,
       loading: false,
       inboundType: 10, // 入库类型  10 采购入库  20 手动入库
       titleText: "",
@@ -85,19 +74,19 @@ export default {
     this.warehouseTypeList = businessDictData.find(
       (item) => item.code === "warehouseType"
     ).children;
-    this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
-      label: item.dictValue,
-      value: item.dictKey,
-    }));
+    // this.selectConfig[0].data = this.warehouseTypeList.map((item) => ({
+    //   label: item.dictValue,
+    //   value: item.dictKey,
+    // }));
     warehouseSelectList().then((res) => {
       this.warehouseSelectList = res.data.data;
     });
-    // this.getList();
+    this.getList();
   },
   methods: {
     getList() {
       this.loading = true;
-      API.outboundList(this.queryParams).then(
+      API.purchaseInboundList(this.queryParams).then(
         (res) => {
           console.log(res, "qq");
           this.tableList = res.data.data.records;
@@ -105,7 +94,7 @@ export default {
           this.loading = false;
         },
         (err) => {
-          console.log("outboundList: " + err);
+          console.log("purchaseInboundList: " + err);
           this.loading = false;
         }
       );
@@ -113,18 +102,29 @@ export default {
     handleQuery() {
       this.getList();
     },
-    handleInbound() {
-      this.form = {
-        id: "",
-        changeDetailsList: [],
-      };
+    handleInbound(row) {
       this.open = true;
+      this.$nextTick(() => {
+        this.$refs.purchaseInbound.loading = true;
+        API.logisticsDetails({ logisticsInfoId: row.id }).then(
+          (res) => {
+            this.form = {
+              purchaseCode: row.purchaseCode,
+              supplierName: row.supplierName,
+              logisticsCompanyName: row.logisticsCompanyName,
+              code: row.code,
+              changeDetailsList: res.data.data,
+            };
+            this.$refs.purchaseInbound.loading = false;
+          },
+          (err) => {
+            console.log("logisticsDetails: " + err);
+            this.$refs.purchaseInbound.loading = false;
+          }
+        );
+      });
     },
     handleCancel() {
-      this.form = {
-        id: "",
-        changeDetailsList: [],
-      };
       this.open = false;
     },
     handleEdit(row) {
@@ -135,23 +135,23 @@ export default {
         this.form.fileInfoList = [];
       }
       this.$nextTick(() => {
-        this.$refs.addInbound.loading = true;
-        this.$refs.addInbound.countryChange(this.form.countryId);
-        this.$refs.addInbound.provinceChange(this.form.provinceId);
-        this.$refs.addInbound.loading = false;
+        this.$refs.purchaseInbound.loading = true;
+        this.$refs.purchaseInbound.countryChange(this.form.countryId);
+        this.$refs.purchaseInbound.provinceChange(this.form.provinceId);
+        this.$refs.purchaseInbound.loading = false;
       });
     },
     handleSubmit() {
-      API.purchaseAdd(this.form).then(
+      API.purchaseAdd(this.form.changeDetailsList).then(
         () => {
-          this.msgSuccess(this.$t("addSuccess"));
-          this.$refs.addInbound.loading = false;
+          this.msgSuccess("入库成功");
+          this.$refs.purchaseInbound.loading = false;
           this.open = false;
           this.getList();
         },
         (err) => {
           console.log("purchaseAdd: " + err);
-          this.$refs.addInbound.loading = false;
+          this.$refs.purchaseInbound.loading = false;
         }
       );
       // if (this.inboundType === 10) {
@@ -161,12 +161,12 @@ export default {
       //     () => {
       //       this.msgSuccess(this.$t("addSuccess"));
       //       this.open = false;
-      //       this.$refs.addInbound.loading = false;
+      //       this.$refs.purchaseInbound.loading = false;
       //       this.getList();
       //     },
       //     (err) => {
       //       console.log("manualAdd: " + err);
-      //       this.$refs.addInbound.loading = false;
+      //       this.$refs.purchaseInbound.loading = false;
       //     }
       //   );
       // }
@@ -214,14 +214,47 @@ export default {
         "
       ></query>
       <el-table :data="tableList" v-loading="loading">
-        <el-table-column label="采购单号" align="center" prop="code" />
-        <el-table-column label="供应商" align="center" prop="name" />
-        <el-table-column label="物流公司" align="center" />
-        <el-table-column label="物流/快递单号" align="center" prop="contacts" />
-        <el-table-column label="采购员" align="center" prop="phone" />
-        <el-table-column label="采购时间" align="center" prop="phone" />
-        <el-table-column label="状态" align="center" prop="phone" />
-        <el-table-column label="状态" align="center" prop="phone">
+        <el-table-column
+          label="采购单号"
+          align="left"
+          prop="purchaseCode"
+          width="150"
+        />
+        <el-table-column label="供应商" align="left" prop="supplierName" />
+        <el-table-column
+          label="物流公司"
+          align="left"
+          prop="logisticsCompanyName"
+          width="100"
+        />
+        <el-table-column
+          label="物流/快递单号"
+          align="left"
+          prop="code"
+          width="180"
+        />
+        <el-table-column
+          label="采购员"
+          align="left"
+          prop="purchaseName"
+          width="100"
+        />
+        <el-table-column
+          label="采购时间"
+          align="left"
+          prop="createTime"
+          width="150"
+        />
+        <el-table-column
+          label="状态"
+          align="left"
+          prop="inStockStatus"
+          width="100"
+          :formatter="
+            (row) => (row.inStockStatus === 10 ? '未入库' : '部分入库')
+          "
+        />
+        <el-table-column label="操作" align="center" width="100">
           <template slot-scope="scope">
             <el-button type="text" @click="handleInbound(scope.row)">
               入库

+ 25 - 17
src/views/inbound-outbound/inbound/cgInbound/purchaseInbound.vue

@@ -10,25 +10,25 @@
       >
         <el-row :gutter="10">
           <el-col :span="4">
-            <el-form-item label="采购单号" prop="code">
-              <el-input v-model="form.code" disabled></el-input>
+            <el-form-item label="采购单号" prop="purchaseCode">
+              <el-input v-model="form.purchaseCode" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="供应商" prop="code">
-              <el-input v-model="form.code" disabled></el-input>
+            <el-form-item label="供应商" prop="supplierName">
+              <el-input v-model="form.supplierName" disabled></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="10">
           <el-col :span="4">
-            <el-form-item label="物流公司" prop="logisticsCompanyCode">
-              <el-input v-model="form.logisticsCode" disabled></el-input>
+            <el-form-item label="物流公司" prop="logisticsCompanyName">
+              <el-input v-model="form.logisticsCompanyName" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="物流/快递单号" prop="logisticsCode">
-              <el-input v-model="form.logisticsCode" disabled></el-input>
+            <el-form-item label="物流/快递单号" prop="code">
+              <el-input v-model="form.code" disabled></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -38,13 +38,13 @@
         </div>
         <el-form-item>
           <el-table :data="form.changeDetailsList">
-            <el-table-column label="物品编码" prop="productCode">
+            <el-table-column label="物品编码" prop="goodsCode">
             </el-table-column>
-            <el-table-column label="物品名称" prop="productName">
+            <el-table-column label="物品名称" prop="goodsName">
             </el-table-column>
-            <el-table-column label="采购数量" prop="productType">
+            <el-table-column label="采购数量" prop="purchaseQuantity">
             </el-table-column>
-            <el-table-column label="本次发货" prop="warehouseName">
+            <el-table-column label="本次发货" prop="shipmentQuantity">
             </el-table-column>
 
             <el-table-column label="本次入库" prop="changeQuantity">
@@ -71,11 +71,9 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
   </div>
@@ -163,10 +161,12 @@ export default {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
+          this.loading = true;
           this.form.changeDetailsList = this.form.changeDetailsList.map(
             (x) => ({
+              businessId: x.id,
+              warehouseId: x.warehouseId,
               goodsId: x.goodsId,
-              warehouseId: this.form.id,
               changeQuantity: x.changeQuantity,
             })
           );
@@ -234,4 +234,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 43 - 78
src/views/inbound-outbound/inbound/manualInbound/addManualInbound.vue

@@ -10,9 +10,9 @@
       >
         <el-row>
           <el-col :span="6">
-            <el-form-item label="仓库名称" prop="id">
+            <el-form-item label="仓库名称" prop="warehouseId">
               <el-select
-                v-model="form.id"
+                v-model="form.warehouseId"
                 :placeholder="$t('pleaseSelect')"
                 style="width: 100%"
                 @change="handleChangeWarehouse"
@@ -36,10 +36,10 @@
         </el-row>
         <el-row>
           <el-col :span="10">
-            <el-form-item label="备注" prop="aa">
+            <el-form-item label="备注" prop="remarks">
               <el-input
                 placeholder="请输入"
-                v-model="form.aa"
+                v-model="form.remarks"
                 type="textarea"
                 :rows="4"
               >
@@ -56,25 +56,23 @@
           >
         </el-form-item>
         <el-form-item>
-          <el-table :data="form.changeDetailsList">
+          <el-table :data="form.changeProductList">
             <el-table-column label="物品编码" prop="productCode">
             </el-table-column>
             <el-table-column label="物品名称" prop="productName">
             </el-table-column>
             <el-table-column label="规格" prop="productType"> </el-table-column>
 
-            <el-table-column label="本次入库" prop="changeQuantity">
+            <el-table-column label="本次入库" prop="quantity">
               <template slot-scope="scope">
                 <el-form-item
-                  :prop="
-                    'changeDetailsList.' + scope.$index + '.changeQuantity'
-                  "
-                  :rules="formRules1.changeQuantity"
+                  :prop="'changeProductList.' + scope.$index + '.quantity'"
+                  :rules="formRules.quantity"
                   :inline-message="true"
                   label-width="0"
                 >
                   <el-input
-                    v-model="scope.row.changeQuantity"
+                    v-model="scope.row.quantity"
                     :placeholder="$t('pleaseInput')"
                     size="mini"
                   >
@@ -82,15 +80,11 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column
-              :label="$t('operation')"
-              width="100"
-              align="center"
-            >
+            <el-table-column label="操作" width="100" align="center">
               <template slot-scope="scope">
-                <el-button type="text" @click="deleteRow(scope.$index)">{{
-                  $t("delete")
-                }}</el-button>
+                <el-button type="text" @click="deleteRow(scope.$index)">
+                  删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -98,16 +92,14 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
 
     <el-dialog
-      :title="$t('goodsSelect')"
+      title="物品选择"
       v-if="selectDialog"
       :visible.sync="selectDialog"
       width="80%"
@@ -122,8 +114,6 @@
 import labelTitle from "@/components/label-title/index.vue";
 import selectProduct from "@/components/select-product/index.vue";
 
-import * as API from "@/api/inbound-outbound/inbound/index.js";
-
 export default {
   name: "addInbound",
   components: { labelTitle, selectProduct },
@@ -146,72 +136,38 @@ export default {
       selectLit: [],
       loading: false,
       formRules: {
-        id: [
+        warehouseId: [
           {
             required: true,
-            message: "请选择物流单号",
+            message: "请选择仓库",
             trigger: "change",
           },
         ],
-        changeQuantity: [
+        quantity: [
           {
             required: true,
-            message: "请输入到货数量",
-            trigger: "blur",
-          },
-        ],
-      },
-      formRules1: {
-        id: [
-          {
-            required: true,
-            message: "请选择收货仓库",
-            trigger: "change",
-          },
-        ],
-        changeQuantity: [
-          {
-            required: true,
-            message: "请输入入库数量",
+            message: "请输入本次入库数量",
             trigger: "blur",
           },
         ],
       },
+
       selectDialog: false,
       warehouseName: "",
     };
   },
-  created() {
-    this.getSelectList();
-  },
+  created() {},
   methods: {
-    getSelectList() {
-      this.loading = true;
-      API.saleOrdersList().then(
-        (res) => {
-          this.selectLit = res.data.data.records;
-          this.loading = false;
-        },
-        (err) => {
-          console.log("saleOrdersList: " + err);
-          this.loading = false;
-        }
-      );
-    },
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
           this.loading = true;
-          this.form.changeDetailsList = this.form.changeDetailsList.map(
+          this.form.changeProductList = this.form.changeProductList.map(
             (x) => ({
-              goodsId: x.goodsId,
-              warehouseId: this.form.id,
-              changeQuantity: x.changeQuantity,
+              productId: x.productId,
+              quantity: x.quantity,
             })
           );
-          delete this.form.id;
-          delete this.form.aa;
-
           this.$emit("submit");
         }
       });
@@ -225,28 +181,29 @@ export default {
       // if (current) {
       //   this.warehouseName = current.name;
       // }
-      this.form.changeDetailsList = [];
+      this.form.changeProductList = [];
     },
     handleAddProduct() {
-      if (!this.form.id) return this.msgInfo("请先选择仓库");
+      if (!this.form.warehouseId) return this.msgInfo("请先选择仓库");
       this.selectDialog = true;
     },
     handleSelect(row) {
-      const flag = this.form.changeDetailsList.some(
-        (x) => x.goodsId === row.id
+      const flag = this.form.changeProductList.some(
+        (x) => x.productId === row.id
       );
       if (flag) return this.msgInfo("该物品已经选择");
       const product = {
         productCode: row.code,
         productName: row.name,
-        goodsId: row.id,
-        changeQuantity: "",
+        productId: row.id,
+        quantity: "",
       };
-      this.form.changeDetailsList.push(product);
+      this.form.changeProductList.push(product);
+      this.msgSuccess("添加成功");
     },
     deleteRow(index) {
-      this.form.changeDetailsList.splice(index, 1);
-      this.msgSuccess(this.$t("deleteSuccess"));
+      this.form.changeProductList.splice(index, 1);
+      this.msgSuccess("删除成功");
     },
   },
 };
@@ -259,4 +216,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 50 - 25
src/views/inbound-outbound/inbound/manualInbound/index.vue

@@ -36,13 +36,6 @@ export default {
         pageSize: 10,
         keyword: "",
         warehouseId: "",
-        status: "",
-        code: "",
-        goodsCode: "",
-        goodsName: "",
-        applyUserId: "",
-        startTime: "",
-        endTime: "",
       },
       selectConfig: [
         {
@@ -51,15 +44,16 @@ export default {
           data: [],
         },
       ],
-      tableList: [{}],
+      tableList: [],
       total: 0,
       loading: false,
       inboundType: 10, // 入库类型  10 采购入库  20 手动入库
       titleText: "",
       open: false,
       form: {
-        id: "",
-        changeDetailsList: [],
+        warehouseId: "",
+        remarks: "",
+        changeProductList: [],
       },
     };
   },
@@ -82,12 +76,12 @@ export default {
       }));
     });
 
-    // this.getList();
+    this.getList();
   },
   methods: {
     getList() {
       this.loading = true;
-      API.outboundList(this.queryParams).then(
+      API.manualInboundList(this.queryParams).then(
         (res) => {
           console.log(res, "qq");
           this.tableList = res.data.data.records;
@@ -95,7 +89,7 @@ export default {
           this.loading = false;
         },
         (err) => {
-          console.log("outboundList: " + err);
+          console.log("manualInboundList: " + err);
           this.loading = false;
         }
       );
@@ -105,8 +99,9 @@ export default {
     },
     handleInbound() {
       this.form = {
-        id: "",
-        changeDetailsList: [],
+        warehouseId: "",
+        remarks: "",
+        changeProductList: [],
       };
       this.open = true;
     },
@@ -116,13 +111,13 @@ export default {
     handleSubmit() {
       API.manualAdd(this.form).then(
         () => {
-          this.msgSuccess(this.$t("addSuccess"));
+          this.msgSuccess("入库成功");
           this.$refs.addManualInbound.loading = false;
           this.open = false;
           this.getList();
         },
         (err) => {
-          console.log("purchaseAdd: " + err);
+          console.log("manualAdd: " + err);
           this.$refs.addManualInbound.loading = false;
         }
       );
@@ -157,14 +152,44 @@ export default {
         "
       ></query>
       <el-table :data="tableList" v-loading="loading">
-        <el-table-column label="仓库名称" align="center" prop="code" />
-        <el-table-column label="物品编码" align="center" prop="name" />
-        <el-table-column label="物品名称" align="center" />
-        <el-table-column label="物流/规格" align="center" prop="contacts" />
-        <el-table-column label="单位" align="center" prop="phone" />
-        <el-table-column label="入库数量" align="center" prop="phone" />
-        <el-table-column label="操作人" align="center" prop="phone" />
-        <el-table-column label="操作时间" align="center" prop="phone" />
+        <el-table-column label="仓库名称" align="left" prop="warehouseName" />
+        <el-table-column
+          label="物品编码"
+          align="left"
+          prop="goodsCode"
+          width="150"
+        />
+        <el-table-column label="物品名称" align="left" prop="goodsName" />
+        <el-table-column
+          label="规格"
+          align="left"
+          prop="goodsSpecs"
+          width="100"
+        />
+        <el-table-column
+          label="单位"
+          align="left"
+          prop="goodsUnit"
+          width="100"
+        />
+        <el-table-column
+          label="入库数量"
+          align="right"
+          prop="changeQuantity"
+          width="120"
+        />
+        <el-table-column
+          label="操作人"
+          align="left"
+          prop="createUser"
+          width="130"
+        />
+        <el-table-column
+          label="操作时间"
+          align="left"
+          prop="createTime"
+          width="180"
+        />
       </el-table>
       <pagination
         v-show="total > 0"

+ 8 - 0
src/views/inbound-outbound/outbound/addOutbound.vue

@@ -267,4 +267,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/inbound-outbound/outbound/manualOutbound/addManualOutbound.vue

@@ -199,4 +199,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/inbound-outbound/outbound/salesOutbound/addOutbound.vue

@@ -267,4 +267,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

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

@@ -54,6 +54,7 @@ export default {
         logisticsCompanyCode: "",
         orderDetailsList: [],
       },
+      addType: "",
     };
   },
   created() {
@@ -98,7 +99,8 @@ export default {
     handleQuery() {
       this.getList();
     },
-    handleOutbound(row) {
+    handleOutbound(row, type = "") {
+      this.addType = type;
       this.open = true;
       this.$nextTick(() => {
         this.$refs.addOutbound.loading = true;
@@ -216,6 +218,9 @@ export default {
             <el-button type="text" @click="handleOutbound(scope.row)"
               >出库
             </el-button>
+            <el-button type="text" @click="handleOutbound(scope.row, '10')"
+              >补发货
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -237,6 +242,7 @@ export default {
     >
       <add-outbound
         :form="form"
+        :addType="addType"
         :orderTypeList="orderTypeList"
         :warehouseSelectList="warehouseSelectList"
         :warehouseTypeList="warehouseTypeList"

+ 8 - 0
src/views/inbound-outbound/transfer/sendTransfer.vue

@@ -244,4 +244,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/inventory-management/check/sendCheck.vue

@@ -211,4 +211,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 221 - 0
src/views/inventory-management/combination/addCombination.vue

@@ -0,0 +1,221 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-row>
+          <el-form-item label="组合名称">
+            <el-input v-model="form.sum" placeholder="请输入"> </el-input>
+          </el-form-item>
+        </el-row>
+        <el-row> 规格:xxxxxxxx </el-row>
+        <el-form-item label="组合后放置仓库" prop="supplieId">
+          <el-select
+            v-model="form.supplieId"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in supplySelectList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="半成品所在仓库" prop="supplieId">
+          <el-select
+            v-model="form.supplieId"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in supplySelectList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="组合数量">
+              <el-input v-model="form.sum" placeholder="请输入"> </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row> 可组合数量:3000 </el-row>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "addReturnsGoods",
+  components: { labelTitle },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    supplySelectList: {
+      type: Array,
+      default: () => [],
+    },
+    supplyTypeList: {
+      type: Array,
+      default: () => [],
+    },
+    productTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+
+      loading: false,
+      formRules: {
+        supplieId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.selectSupply"),
+            trigger: "change",
+          },
+        ],
+        planArrivalTime: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.askArrivalTime"),
+            trigger: "change",
+          },
+        ],
+        countryId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.country"),
+            trigger: "change",
+          },
+        ],
+        provinceId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.province"),
+            trigger: "change",
+          },
+        ],
+        cityId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.city"),
+            trigger: "change",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.purchaseType"),
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.purchaseName"),
+            trigger: "blur",
+          },
+        ],
+        contacts: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.contacts"),
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.contactNumber"),
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
+</style>

+ 268 - 0
src/views/inventory-management/combination/index.vue

@@ -0,0 +1,268 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import byTable from "@/components/by-table/index.js";
+import addCombination from "./addCombination.vue";
+import { supplySelect } from "@/api/product-material/supply/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    addCombination,
+  },
+  data() {
+    return {
+      supplyTypeList: [],
+      supplySelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "组合操作",
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        // {
+        //   label: "退款状态",
+        //   prop: "type",
+        //   data: [],
+        // },
+      ],
+      tableList: [],
+      loading: false,
+      titleText: "组合操作",
+      open: false,
+      form: {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [{}],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+
+    this.supplyTypeList = businessDictData.find(
+      (item) => item.code === "supplyType"
+    ).children;
+
+    supplySelect({ name: "", code: "", type: "" }).then((res) => {
+      this.supplySelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addCustomer.loading = true;
+        this.$refs.addCustomer.countryChange(this.form.countryId);
+        this.$refs.addCustomer.provinceChange(this.form.provinceId);
+        this.$refs.addCustomer.loading = false;
+      });
+    },
+    handleSubmit() {
+      if (!this.form.id) {
+        API.outboundAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.outboundEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundEdit: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="产品组合编码" align="center" prop="code" />
+
+        <el-table-column label="产品组合名称" align="center" prop="code" />
+        <el-table-column label="规格" align="center" prop="name" />
+        <el-table-column label="单位" align="center" :formatter="showAddress" />
+        <el-table-column
+          label="组合后放置仓库"
+          align="center"
+          prop="contacts"
+        />
+        <el-table-column label="半成品所在仓库" align="center" prop="phone" />
+        <el-table-column label="组合数量" align="center" prop="phone" />
+        <el-table-column label="操作人" align="center" prop="phone" />
+        <el-table-column label="操作时间" align="center" prop="phone" />
+
+        <el-table-column label="操作" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleEdit(scope.row)"
+              >查看
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="30%"
+      top="60px"
+    >
+      <add-combination
+        :form="form"
+        :supplyTypeList="supplyTypeList"
+        :supplySelectList="supplySelectList"
+        :productTypeList="productTypeList"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addCombination"
+      ></add-combination>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 8 - 0
src/views/order-management/afterSales/addAfterSales.vue

@@ -279,4 +279,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/order-management/order/addOrder.vue

@@ -568,4 +568,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 31 - 63
src/views/product-material/customer/addCustomer.vue

@@ -10,14 +10,8 @@
       >
         <el-row>
           <el-col :span="8">
-            <el-form-item
-              :label="$t('product_material.customer.customerCode')"
-              prop="code"
-            >
-              <el-input
-                v-model="form.code"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+            <el-form-item label="客户编码" prop="code">
+              <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="1"></el-col>
@@ -28,23 +22,17 @@
           </el-col>
         </el-row>
 
-        <el-form-item
-          :label="$t('product_material.customer.customerName')"
-          prop="name"
-        >
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="客户名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入"></el-input>
         </el-form-item>
 
-        <el-form-item :label="$t('product_material.customer.address')" required>
+        <el-form-item label="详细地址" required>
           <el-row :gutter="10">
             <el-col :span="8">
               <el-form-item label-width="0" prop="countryId">
                 <el-select
                   v-model="form.countryId"
-                  :placeholder="$t('product_material.customer.country')"
+                  placeholder="国家"
                   style="width: 100%"
                   @change="countryChange"
                 >
@@ -62,7 +50,7 @@
               <el-form-item label-width="0" prop="provinceId">
                 <el-select
                   v-model="form.provinceId"
-                  :placeholder="$t('product_material.customer.province')"
+                  placeholder="省/洲"
                   style="width: 100%"
                   @change="provinceChange"
                   :disabled="!provinceData.length > 0"
@@ -81,7 +69,7 @@
               <el-form-item label-width="0" prop="cityId">
                 <el-select
                   v-model="form.cityId"
-                  :placeholder="$t('product_material.customer.city')"
+                  placeholder="城市"
                   style="width: 100%"
                   :disabled="!provinceData.length > 0 && !cityData.length > 0"
                 >
@@ -101,29 +89,23 @@
         <el-form-item label="" prop="detailedAddress">
           <el-input
             v-model="form.detailedAddress"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入详细地址"
             type="textarea"
             rows="4"
           ></el-input>
         </el-form-item>
 
-        <el-form-item
-          :label="$t('product_material.customer.contactInfo')"
-          required
-        >
+        <el-form-item label="联系信息" required>
           <el-row :gutter="10">
             <el-col :span="8">
               <el-form-item label-width="0" prop="contacts">
-                <el-input
-                  v-model="form.contacts"
-                  :placeholder="$t('pleaseInput')"
-                >
+                <el-input v-model="form.contacts" placeholder="联系人">
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label-width="0" prop="phone">
-                <el-input v-model="form.phone" :placeholder="$t('pleaseInput')">
+                <el-input v-model="form.phone" placeholder="联系电话">
                   <template>
                     <div slot="prepend">+ 86</div>
                   </template>
@@ -133,7 +115,7 @@
           </el-row>
         </el-form-item>
 
-        <el-form-item :label="$t('product_material.customer.enclosure')">
+        <el-form-item label="上传附件">
           <el-upload
             class="upload-demo"
             action="/api/service-file/uploadFile"
@@ -151,7 +133,7 @@
         <el-form-item label="备注" prop="remark">
           <el-input
             v-model="form.remark"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入"
             type="textarea"
             rows="4"
           ></el-input>
@@ -159,11 +141,9 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
   </div>
@@ -196,63 +176,43 @@ export default {
         countryId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.customer.country"),
+            message: "请选择国家",
             trigger: "change",
           },
         ],
         provinceId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.customer.province"),
+            message: "请选择省/洲",
             trigger: "change",
           },
         ],
         cityId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.customer.city"),
-            trigger: "change",
-          },
-        ],
-        type: [
-          {
-            required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.customer.customerType"),
+            message: "请选择城市",
             trigger: "change",
           },
         ],
+
         name: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.customer.customerName"),
+            message: "请输入客户名称",
             trigger: "blur",
           },
         ],
         contacts: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.customer.contacts"),
+            message: "请输入联系人",
             trigger: "blur",
           },
         ],
         phone: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.customer.contactNumber"),
+            message: "请输入联系电话",
             trigger: "blur",
           },
         ],
@@ -305,4 +265,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 26 - 26
src/views/product-material/customer/index.vue

@@ -22,7 +22,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: this.$t("product_material.customer.customerAdd"),
+              name: "添加客户",
               methodsText: "add",
               type: "primary",
               add: () => {
@@ -30,7 +30,7 @@ export default {
               },
             },
             {
-              name: this.$t("excelImport"),
+              name: "Excel导入",
               methodsText: "excelImport",
               type: "defualt",
               excelImport: () => {
@@ -149,7 +149,7 @@ export default {
       if (!this.form.id) {
         API.customerAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addCustomer.loading = false;
             this.open = false;
             this.getList();
@@ -162,7 +162,7 @@ export default {
       } else {
         API.customerEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addCustomer.loading = false;
             this.getList();
@@ -176,13 +176,13 @@ export default {
     },
 
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
         API.customerDel({ id: row.id }).then(() => {
-          this.msgSuccess(this.$t("deleteSuccess"));
+          this.msgSuccess("删除成功");
           this.getList();
         });
       });
@@ -218,38 +218,42 @@ export default {
       ></query>
       <el-table :data="tableList" v-loading="loading">
         <el-table-column
-          :label="$t('product_material.customer.customerCode')"
-          align="center"
+          label="客户编码"
+          align="left"
           prop="code"
+          width="140"
         />
         <el-table-column
-          :label="$t('product_material.customer.customerName')"
-          align="center"
+          label="客户名称"
+          align="left"
           prop="name"
+          width="160"
         />
         <el-table-column
-          :label="$t('product_material.customer.whereCity')"
-          align="center"
+          label="所在城市"
+          align="left"
           :formatter="showAddress"
         />
         <el-table-column
-          :label="$t('product_material.customer.contacts')"
-          align="center"
+          label="联系人"
+          align="left"
           prop="contacts"
+          width="120"
         />
         <el-table-column
-          :label="$t('product_material.customer.contactNumber')"
-          align="center"
+          label="联系电话"
+          align="left"
           prop="phone"
+          width="160"
         />
 
-        <el-table-column :label="$t('operation')" align="center" width="120">
+        <el-table-column label="操作" align="center" width="120">
           <template slot-scope="scope">
             <el-button type="text" @click="handleEdit(scope.row)"
-              >{{ $t("edit") }}
+              >修改
             </el-button>
             <el-button type="text" @click="handleDelete(scope.row)"
-              >{{ $t("delete") }}
+              >删除
             </el-button>
           </template>
         </el-table-column>
@@ -265,11 +269,7 @@ export default {
     </el-card>
 
     <el-dialog
-      :title="
-        titleText === 'add'
-          ? $t('product_material.customer.customerAdd')
-          : $t('product_material.customer.customerEdit')
-      "
+      :title="titleText === 'add' ? '添加客户' : '编辑客户'"
       :visible.sync="open"
       v-if="open"
       width="50%"

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

@@ -29,7 +29,7 @@
             >
               <el-select
                 v-model="form.type"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 style="width: 100%"
               >
                 <el-option
@@ -49,10 +49,7 @@
               :label="$t('product_material.material.materialCode')"
               prop="code"
             >
-              <el-input
-                v-model="form.code"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+              <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="18">
@@ -65,10 +62,7 @@
           :label="$t('product_material.material.materialName')"
           prop="name"
         >
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+          <el-input v-model="form.name" placeholder="请输入"></el-input>
         </el-form-item>
         <el-row>
           <el-col :span="6">
@@ -78,7 +72,7 @@
             >
               <el-select
                 v-model="form.unit"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 style="width: 100%"
               >
                 <el-option
@@ -114,7 +108,7 @@
           <el-input
             v-model="form.introduce"
             type="textarea"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入"
             :rows="4"
           ></el-input>
         </el-form-item>
@@ -134,11 +128,9 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
   </div>
@@ -275,4 +267,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 36 - 46
src/views/product-material/material/index.vue

@@ -6,9 +6,9 @@
       </el-col>
       <el-col :span="18" class="right">
         <el-card class="top">
-          <el-button type="primary" size="small" @click="materialAdd">{{
-            $t("product_material.material.materialAdd")
-          }}</el-button>
+          <el-button type="primary" size="small" @click="materialAdd"
+            >添加物料</el-button
+          >
         </el-card>
         <el-card class="bottom">
           <query
@@ -24,48 +24,45 @@
           ></query>
           <el-table :data="tableList" v-loading="loading">
             <el-table-column
-              :label="$t('product_material.material.materialType')"
-              align="center"
+              label="物料类型"
+              align="left"
               prop="type"
+              width="100"
               :formatter="(row) => dictDataEcho(row.type, materialTypeList)"
             />
             <el-table-column
-              :label="$t('product_material.material.materialCode')"
-              align="center"
+              label="物料编码"
+              align="left"
               prop="code"
+              width="120"
             />
             <el-table-column
-              :label="$t('product_material.material.materialName')"
-              align="center"
+              label="物料名称"
+              align="left"
               prop="name"
+              width="150"
             />
             <el-table-column
-              :label="$t('product_material.material.materialUnit')"
-              align="center"
+              label="物料单位"
+              align="left"
               prop="unit"
+              width="80"
             />
             <el-table-column
-              :label="$t('product_material.material.deptId')"
-              align="center"
-              prop="deptId"
-            />
-            <el-table-column
-              :label="$t('product_material.material.description')"
-              align="center"
-              prop="introduce"
+              label="管理部门"
+              align="left"
+              prop="deptName"
+              width="120"
             />
+            <el-table-column label="物料说明" align="left" prop="introduce" />
 
-            <el-table-column
-              :label="$t('operation')"
-              align="center"
-              width="120"
-            >
+            <el-table-column label="操作" align="center" width="120">
               <template slot-scope="scope">
                 <el-button type="text" @click="handleEdit(scope.row)"
-                  >{{ $t("edit") }}
+                  >修改
                 </el-button>
                 <el-button type="text" @click="handleDelete(scope.row)"
-                  >{{ $t("delete") }}
+                  >删除
                 </el-button>
               </template>
             </el-table-column>
@@ -78,11 +75,7 @@
             @pagination="getList"
           />
           <el-dialog
-            :title="
-              titleText === 'add'
-                ? $t('product_material.material.materialAdd')
-                : $t('product_material.material.materialEdit')
-            "
+            :title="titleText === 'add' ? '添加物料' : '编辑物料'"
             :visible.sync="open"
             v-if="open"
             width="50%"
@@ -115,7 +108,7 @@
                     >
                       <el-select
                         v-model="req.type"
-                        :placeholder="$t('pleaseSelect')"
+                        placeholder="请选择"
                         style="width: 100%"
                       >
                         <el-option
@@ -137,7 +130,7 @@
                     >
                       <el-select
                         v-model="req.deptId"
-                        :placeholder="$t('pleaseSelect')"
+                        placeholder="请选择"
                         style="width: 100%"
                       >
                         <el-option
@@ -159,7 +152,7 @@
                     >
                       <el-input
                         v-model="req.code"
-                        :placeholder="$t('pleaseInput')"
+                        placeholder="请输入"
                       ></el-input>
                     </el-form-item>
                   </el-col>
@@ -167,10 +160,7 @@
                 <el-form-item
                   :label="$t('product_material.material.materialName')"
                 >
-                  <el-input
-                    v-model="req.name"
-                    :placeholder="$t('pleaseInput')"
-                  ></el-input>
+                  <el-input v-model="req.name" placeholder="请输入"></el-input>
                 </el-form-item>
               </el-form>
             </div>
@@ -179,7 +169,7 @@
                 >{{ $t("reset") }}
               </el-button>
               <el-button type="primary" size="small" @click="handleQuery">
-                {{ $t("submit") }}</el-button
+                确定</el-button
               >
             </div>
           </el-dialog>
@@ -229,7 +219,7 @@ export default {
       loading: false,
       selectConfig: [
         {
-          label: this.$t("product_material.material.materialType"),
+          label: "物料类型",
           prop: "type",
           data: [],
         },
@@ -353,14 +343,14 @@ export default {
       });
     },
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
           API.materialDel({ id: row.id, type: "1" }).then(() => {
-            this.msgSuccess(this.$t("deleteSuccess"));
+            this.msgSuccess("删除成功");
             this.getList();
           });
         })
@@ -389,7 +379,7 @@ export default {
       if (!this.form.id) {
         API.materialAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addMaterial.loading = false;
             this.open = false;
             this.getList();
@@ -402,7 +392,7 @@ export default {
       } else {
         API.materialEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addProduct.loading = false;
             this.getList();

+ 13 - 17
src/views/product-material/material/tree.vue

@@ -2,10 +2,10 @@
   <el-card shadow="always" :body-style="{ padding: '20px' }">
     <div class="tree-title">
       <div class="bk"></div>
-      <div>{{ $t("product_material.material.materialClassify") }}</div>
+      <div>物料分类</div>
     </div>
     <el-row class="search" style="display: flex; align-items: center">
-      <el-input :placeholder="$t('search')" v-model="filterText" size="small">
+      <el-input placeholder="请输入搜索内容" v-model="filterText" size="small">
       </el-input>
       <div style="width: 100px; margin-left: 10px">
         <el-button size="mini" @click="add"> 新增</el-button>
@@ -41,11 +41,7 @@
       </span>
     </el-tree>
     <el-dialog
-      :title="
-        treeModalType === 'add'
-          ? $t('product_material.material.treeModalAdd')
-          : $t('product_material.material.treeModalEdit')
-      "
+      :title="treeModalType === 'add' ? '添加分类' : '编辑分类'"
       v-if="treeModal"
       :visible.sync="treeModal"
       width="40%"
@@ -85,21 +81,21 @@ export default {
       treeForm: {
         loadingStatus: false,
         name: {
-          label: this.$t("product_material.material.treeName"),
+          label: "分类名称",
           type: "input",
         },
         otherButton: {
           align: "center",
           list: [
             {
-              name: this.$t("cancelText"),
+              name: "取消",
               methodsText: "cancel",
               cancel: () => {
                 this.treeModal = false;
               },
             },
             {
-              name: this.$t("submitText"),
+              name: "确定",
               methodsText: "submit",
               type: "primary",
               submit: () => {
@@ -113,7 +109,7 @@ export default {
         name: [
           {
             required: true,
-            message: this.$t("product_material.material.nameRules"),
+            message: "请输入分类名称",
             trigger: "blur",
           },
         ],
@@ -150,7 +146,7 @@ export default {
           if (!this.treeParams.id) {
             API.materialClassifyAdd(this.treeParams).then(
               () => {
-                this.msgSuccess(this.$t("addSuccess"));
+                this.msgSuccess("添加成功");
                 this.treeModal = false;
                 this.treeForm.loadingStatus = false;
                 this.getTree();
@@ -163,7 +159,7 @@ export default {
           } else {
             API.materialClassifyEdit(this.treeParams).then(
               () => {
-                this.msgSuccess(this.$t("editSuccess"));
+                this.msgSuccess("编辑成功");
                 this.treeModal = false;
                 this.treeForm.loadingStatus = false;
                 this.getTree();
@@ -214,14 +210,14 @@ export default {
       this.treeModal = true;
     },
     del(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
           API.materialClassifyDel({ id: row.id, type: "2" }).then(() => {
-            this.msgSuccess(this.$t("deleteSuccess"));
+            this.msgSuccess("删除成功");
             this.getTree();
           });
         })

+ 91 - 142
src/views/product-material/product/addProduct.vue

@@ -8,10 +8,7 @@
         ref="form"
         label-width="100px"
       >
-        <el-form-item
-          :label="$t('product_material.product.productClassify')"
-          prop="classifyId"
-        >
+        <el-form-item label="产品分类" prop="classifyId">
           <el-cascader
             :options="selectList"
             v-model="form.classifyId"
@@ -21,10 +18,7 @@
             size="small"
           ></el-cascader>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.product.productType')"
-          prop="type"
-        >
+        <el-form-item label="产品类型" prop="type">
           <el-radio-group v-model="form.type">
             <el-radio-button
               v-for="item in productTypeList"
@@ -37,14 +31,8 @@
         </el-form-item>
         <el-row :gutter="10">
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.productCode')"
-              prop="code"
-            >
-              <el-input
-                v-model="form.code"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+            <el-form-item label="产品编码" prop="code">
+              <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="18">
@@ -53,24 +41,18 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item
-          :label="$t('product_material.product.productName')"
-          prop="name"
-        >
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="产品名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入"></el-input>
+        </el-form-item>
+        <el-form-item label="规格" prop="specs">
+          <el-input v-model="form.specs" placeholder="请输入"></el-input>
         </el-form-item>
         <el-row>
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.productUnit')"
-              prop="unit"
-            >
+            <el-form-item label="产品单位" prop="unit">
               <el-select
                 v-model="form.unit"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 style="width: 100%"
               >
                 <el-option
@@ -86,51 +68,39 @@
         </el-row>
         <el-row :gutter="10">
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.jdPurchasePrice')"
-              prop="jdPurchasePrice"
-            >
+            <el-form-item label="京东供价" prop="jdPurchasePrice">
               <el-input
                 v-model="form.jdPurchasePrice"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.sellingPrice')"
-              prop="sellingPrice"
-            >
+            <el-form-item label="标准售价" prop="sellingPrice">
               <el-input
                 v-model="form.sellingPrice"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="10">
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.purchasePrice')"
-              prop="purchasePrice"
-            >
+            <el-form-item label="标准采购价" prop="purchasePrice">
               <el-input
                 v-model="form.purchasePrice"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="10">
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.product.clearancePeriod')"
-              prop="clearancePeriod"
-            >
+            <el-form-item label="库存清空期限" prop="clearancePeriod">
               <el-date-picker
                 v-model="form.clearancePeriod"
                 type="datetime"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
@@ -150,115 +120,100 @@
             <i class="el-icon-plus"></i>
           </el-upload>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.product.combination')"
-          prop="combination"
-        >
+        <el-form-item label="是否组合" prop="combination">
           <el-radio-group v-model="form.combination">
-            <el-radio-button label="1">
-              {{ $t("product_material.product.yes") }}</el-radio-button
-            >
-            <el-radio-button label="0">
-              {{ $t("product_material.product.no") }}</el-radio-button
-            >
+            <el-radio-button label="1"> 是</el-radio-button>
+            <el-radio-button label="0"> 否</el-radio-button>
           </el-radio-group>
         </el-form-item>
-        <div style="margin-bottom: 20px" v-if="form.combination === '1'">
-          <labelTitle
-            :content="$t('product_material.product.combinationDetails')"
-          ></labelTitle>
+        <div style="margin-top: 20px" v-if="form.combination === '1'">
+          <labelTitle content="组合明细"></labelTitle>
         </div>
         <el-form-item label-width="0px" v-if="form.combination === '1'">
-          <el-button @click="selectDialog = true">
-            {{ $t("select") }}</el-button
-          >
+          <el-button size="small" @click="selectDialog = true"> 选择</el-button>
         </el-form-item>
         <el-form-item v-if="form.combination === '1'">
           <el-table :data="form.productCombinationList">
-            <el-table-column
-              :label="$t('product_material.product.productCode')"
-              prop="code"
-            >
-            </el-table-column>
-            <el-table-column
-              :label="$t('product_material.product.productName')"
-              prop="name"
-            >
+            <el-table-column label="产品编码" prop="code"> </el-table-column>
+            <el-table-column label="产品名称" prop="name"> </el-table-column>
+            <el-table-column label="本次入库" prop="linkQuantity">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="
+                    'productCombinationList.' + scope.$index + '.linkQuantity'
+                  "
+                  :rules="formRules.linkQuantity"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.linkQuantity"
+                    placeholder="请输入"
+                    size="mini"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
             </el-table-column>
-            <el-table-column
-              :label="$t('operation')"
-              width="100"
-              align="center"
-            >
+            <el-table-column label="操作" width="100" align="center">
               <template slot-scope="scope">
-                <el-button type="text" @click="deleteRow(scope.$index)">{{
-                  $t("delete")
-                }}</el-button>
+                <el-button type="text" @click="deleteRow(scope.$index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
         </el-form-item>
-        <div style="margin-bottom: 20px">
-          <labelTitle
-            :content="$t('product_material.product.lifeCycleRules')"
-          ></labelTitle>
+        <div style="margin-top: 20px">
+          <labelTitle content="生命周期规则"></labelTitle>
         </div>
         <el-row :gutter="10">
-          <el-form-item
-            :label="$t('product_material.product.newProductsExpectedSales')"
-            prop="newProductsExpectedSales"
-          >
+          <el-form-item label="新品期" prop="newProductsExpectedSales">
             <el-col :span="2" style="text-align: center">
               0 &nbsp;&nbsp;~
             </el-col>
             <el-col :span="3">
               <el-input
                 v-model="form.newProductsDay"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-col>
             <el-col :span="1" style="text-align: center"> : </el-col>
             <el-col :span="6">
               <el-input
                 v-model="form.newProductsExpectedSales"
-                :placeholder="$t('pleaseInput')"
+                placeholder="预期销量"
               ></el-input>
             </el-col>
           </el-form-item>
         </el-row>
         <el-row :gutter="10">
-          <el-form-item
-            :label="$t('product_material.product.growUpExpectedSales')"
-            prop="growUpExpectedSales"
-          >
+          <el-form-item label="成长期" prop="growUpExpectedSales">
             <el-col :span="2" style="text-align: center">
               61 &nbsp;&nbsp;~
             </el-col>
             <el-col :span="3">
               <el-input
                 v-model="form.growUpDay"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-col>
             <el-col :span="1" style="text-align: center"> : </el-col>
             <el-col :span="6">
               <el-input
                 v-model="form.growUpExpectedSales"
-                :placeholder="$t('pleaseInput')"
+                placeholder="预期销量"
               ></el-input>
             </el-col>
           </el-form-item>
         </el-row>
         <el-row>
-          <el-form-item
-            :label="$t('product_material.product.matureExpectedSales')"
-            prop="matureExpectedSales"
-          >
+          <el-form-item label="成熟期" prop="matureExpectedSales">
             <el-col :span="3"> 大于120天 : </el-col>
             <el-col :span="6">
               <el-input
                 v-model="form.matureExpectedSales"
-                :placeholder="$t('pleaseInput')"
+                placeholder="预期销量"
               ></el-input>
             </el-col>
           </el-form-item>
@@ -266,16 +221,14 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
 
     <el-dialog
-      :title="$t('productSelect')"
+      title="产品选择"
       v-if="selectDialog"
       :visible.sync="selectDialog"
       width="80%"
@@ -314,69 +267,57 @@ export default {
       selectList: [],
       productTypeList: [],
       productUnitList: [],
-      form: {
-        classifyId: "",
-        deptId: "",
-        type: "",
-        code: "",
-        name: "",
-        unit: "",
-        combination: "",
-        purchasePrice: "",
-        sellingPrice: "",
-        jdPurchasePrice: "",
-        newProductsDay: "",
-        growUpDay: "",
-        newProductsExpectedSales: "",
-        growUpExpectedSales: "",
-        matureExpectedSales: "",
-        clearancePeriod: "",
-        productCombinationList: [],
-      },
 
       formRules: {
         classifyId: [
           {
             required: true,
-            message: this.$t("product_material.product.productClassifyRules"),
+            message: "请选择产品分类",
             trigger: "change",
           },
         ],
         type: [
           {
             required: true,
-            message: this.$t("product_material.product.productTypeRules"),
+            message: "请选择产品类型",
             trigger: "change",
           },
         ],
-        // code: [
-        //   {
-        //     required: true,
-        //     message: this.$t("product_material.product.productCodeRules"),
-        //     trigger: "blur",
-        //   },
-        // ],
         unit: [
           {
             required: true,
-            message: this.$t("product_material.product.productUnitRules"),
+            message: "请选择产品单位",
             trigger: "change",
           },
         ],
         name: [
           {
             required: true,
-            message: this.$t("product_material.product.productNameRules"),
+            message: "请输入产品名称",
+            trigger: "blur",
+          },
+        ],
+        specs: [
+          {
+            required: true,
+            message: "请输入规格",
             trigger: "blur",
           },
         ],
         combination: [
           {
             required: true,
-            message: this.$t("product_material.product.combinationRules"),
+            message: "请选择是否组合",
             trigger: "change",
           },
         ],
+        linkQuantity: [
+          {
+            required: true,
+            message: "请输入数量",
+            trigger: "blur",
+          },
+        ],
       },
       selectDialog: false,
     };
@@ -428,11 +369,11 @@ export default {
         code: row.code,
         name: row.name,
       });
-      this.msgSuccess(this.$t("addSuccess"));
+      this.msgSuccess("添加成功");
     },
     deleteRow(index) {
       this.form.productCombinationList.splice(index, 1);
-      this.msgSuccess(this.$t("deleteSuccess"));
+      this.msgSuccess("删除成功");
     },
   },
 };
@@ -445,4 +386,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 53 - 55
src/views/product-material/product/index.vue

@@ -6,9 +6,9 @@
       </el-col>
       <el-col :span="18" class="right">
         <el-card class="top">
-          <el-button type="primary" size="small" @click="productAdd">{{
-            $t("product_material.product.productAdd")
-          }}</el-button>
+          <el-button type="primary" size="small" @click="productAdd"
+            >添加产品</el-button
+          >
         </el-card>
         <el-card class="bottom">
           <query
@@ -24,70 +24,75 @@
           ></query>
           <el-table :data="tableList" v-loading="loading">
             <el-table-column
-              :label="$t('product_material.product.productType')"
-              align="center"
+              label="产品类型"
+              align="left"
               prop="type"
+              width="100"
               :formatter="(row) => dictDataEcho(row.type, productTypeList)"
             />
             <el-table-column
-              :label="$t('product_material.product.productCode')"
-              align="center"
+              label="产品编码"
+              align="left"
               prop="code"
+              width="120"
             />
             <el-table-column
-              :label="$t('product_material.product.productName')"
-              align="center"
+              label="产品名称"
+              align="left"
               prop="name"
+              min-width="150"
               :formatter="showIsCombination"
             />
+            <el-table-column label="单位" align="left" prop="unit" width="80" />
             <el-table-column
-              :label="$t('product_material.product.productUnit')"
-              align="center"
-              prop="unit"
-            />
-            <el-table-column
-              :label="$t('product_material.product.deptId')"
-              align="center"
+              label="部门"
+              align="left"
               prop="deptName"
+              width="120"
             />
             <el-table-column
-              :label="$t('product_material.product.lifeCycle')"
-              align="center"
+              label="生命周期"
+              align="left"
               prop="lifeCycle"
+              width="100"
             />
             <el-table-column
-              :label="$t('product_material.product.cycleSales')"
-              align="center"
+              label="当前周期销量"
+              align="left"
               prop="cycleSales"
               width="120"
             />
             <el-table-column
-              :label="$t('product_material.product.jdPurchasePrice')"
-              align="center"
+              label="京东供价"
+              align="left"
               prop="jdPurchasePrice"
+              width="100"
             />
             <el-table-column
-              :label="$t('product_material.product.sellingPrice')"
-              align="center"
+              label="标准售价"
+              align="left"
               prop="sellingPrice"
+              width="100"
             />
             <el-table-column
-              :label="$t('product_material.product.purchasePrice')"
-              align="center"
+              label="标准采购价"
+              align="left"
               prop="purchasePrice"
+              width="100"
             />
 
             <el-table-column
-              :label="$t('operation')"
+              label="操作"
               align="center"
               width="120"
+              fixed="right"
             >
               <template slot-scope="scope">
                 <el-button type="text" @click="handleEdit(scope.row)"
-                  >{{ $t("edit") }}
+                  >修改
                 </el-button>
                 <el-button type="text" @click="handleDelete(scope.row)"
-                  >{{ $t("delete") }}
+                  >删除
                 </el-button>
               </template>
             </el-table-column>
@@ -102,11 +107,7 @@
           />
 
           <el-dialog
-            :title="
-              titleText === 'add'
-                ? $t('product_material.product.productAdd')
-                : $t('product_material.product.productEdit')
-            "
+            :title="titleText === 'add' ? '添加产品' : '编辑产品'"
             :visible.sync="open"
             v-if="open"
             width="50%"
@@ -152,7 +153,7 @@
                     >
                       <el-input
                         v-model="req.code"
-                        :placeholder="$t('pleaseInput')"
+                        placeholder="请输入"
                       ></el-input>
                     </el-form-item>
                   </el-col>
@@ -162,7 +163,7 @@
                     >
                       <el-input
                         v-model="req.name"
-                        :placeholder="$t('pleaseInput')"
+                        placeholder="请输入"
                       ></el-input>
                     </el-form-item>
                   </el-col>
@@ -208,7 +209,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.jdPurchasePriceMin"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -217,7 +218,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.jdPurchasePriceMax"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -231,7 +232,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.sellingPriceMin"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -240,7 +241,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.sellingPriceMax"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -254,7 +255,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.purchasePriceMin"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -263,7 +264,7 @@
                       <el-form-item label-width="0px">
                         <el-input
                           v-model="req.purchasePriceMax"
-                          :placeholder="$t('pleaseInput')"
+                          placeholder="请输入"
                         ></el-input>
                       </el-form-item>
                     </el-col>
@@ -313,7 +314,7 @@
                 >{{ $t("reset") }}
               </el-button>
               <el-button type="primary" size="small" @click="handleQuery">
-                {{ $t("submit") }}</el-button
+                确定</el-button
               >
             </div>
           </el-dialog>
@@ -367,7 +368,6 @@ export default {
         jdPurchasePriceMin: "",
         jdPurchasePriceMax: "",
         combination: "",
-
         warehouseId: "",
         beginTime: null,
         endTime: null,
@@ -378,7 +378,7 @@ export default {
       loading: false,
       selectConfig: [
         {
-          label: this.$t("product_material.product.productType"),
+          label: "产品类型",
           prop: "type",
           data: [],
         },
@@ -388,7 +388,7 @@ export default {
         //   data: [],
         // },
         {
-          label: this.$t("product_material.product.lifeCycle"),
+          label: "生命周期",
           prop: "lifeCycle",
           data: [],
         },
@@ -401,6 +401,7 @@ export default {
         type: "",
         code: "",
         name: "",
+        specs: "",
         unit: "",
         combination: "",
         purchasePrice: "",
@@ -433,7 +434,6 @@ export default {
     const list = businessDictData.find(
       (item) => item.code === "productType"
     ).children;
-    console.log(list, "sss");
     this.selectConfig[0].data = list.map((item) => ({
       label: item.dictValue,
       value: item.dictKey,
@@ -446,8 +446,6 @@ export default {
       console.log(data);
       // 部门数据处理
       this.req.deptId = data.id;
-
-      console.log(this.req, "qqq");
       this.handleQuery();
     },
     handleDateChange() {
@@ -570,14 +568,14 @@ export default {
       }
     },
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
           API.productDel({ id: row.id }).then(() => {
-            this.msgSuccess(this.$t("deleteSuccess"));
+            this.msgSuccess("删除成功");
             this.getList();
           });
         })
@@ -594,7 +592,7 @@ export default {
       if (!this.form.id) {
         API.productAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addProduct.loading = false;
             this.open = false;
             this.getList();
@@ -607,7 +605,7 @@ export default {
       } else {
         API.productEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addProduct.loading = false;
             this.getList();

+ 13 - 17
src/views/product-material/product/tree.vue

@@ -2,10 +2,10 @@
   <el-card shadow="always" :body-style="{ padding: '20px' }">
     <div class="tree-title">
       <div class="bk"></div>
-      <div>{{ $t("product_material.product.productClassify") }}</div>
+      <div>产品分类</div>
     </div>
     <el-row class="search" style="display: flex; align-items: center">
-      <el-input :placeholder="$t('search')" v-model="filterText" size="small">
+      <el-input placeholder="请输入搜索内容" v-model="filterText" size="small">
       </el-input>
       <div style="width: 100px; margin-left: 10px">
         <el-button size="mini" @click="add"> 添加</el-button>
@@ -41,11 +41,7 @@
       </span>
     </el-tree>
     <el-dialog
-      :title="
-        treeModalType == 'add'
-          ? $t('product_material.product.treeModalAdd')
-          : $t('product_material.product.treeModalEdit')
-      "
+      :title="treeModalType == 'add' ? '添加分类' : '编辑分类'"
       v-if="treeModal"
       :visible.sync="treeModal"
       width="40%"
@@ -85,21 +81,21 @@ export default {
       treeForm: {
         loadingStatus: false,
         name: {
-          label: this.$t("product_material.product.treeName"),
+          label: "分类名称",
           type: "input",
         },
         otherButton: {
           align: "center",
           list: [
             {
-              name: this.$t("cancelText"),
+              name: "取消",
               methodsText: "cancel",
               cancel: () => {
                 this.treeModal = false;
               },
             },
             {
-              name: this.$t("submitText"),
+              name: "确定",
               methodsText: "submit",
               type: "primary",
               submit: () => {
@@ -113,7 +109,7 @@ export default {
         name: [
           {
             required: true,
-            message: this.$t("product_material.product.nameRules"),
+            message: "请输入分类名称",
             trigger: "blur",
           },
         ],
@@ -150,7 +146,7 @@ export default {
           if (!this.treeParams.id) {
             API.productClassifyAdd(this.treeParams).then(
               () => {
-                this.msgSuccess(this.$t("addSuccess"));
+                this.msgSuccess("添加成功");
                 this.treeModal = false;
                 this.treeForm.loadingStatus = false;
                 this.getTree();
@@ -163,7 +159,7 @@ export default {
           } else {
             API.productClassifyEdit(this.treeParams).then(
               () => {
-                this.msgSuccess(this.$t("editSuccess"));
+                this.msgSuccess("编辑成功");
                 this.treeModal = false;
                 this.treeForm.loadingStatus = false;
                 this.getTree();
@@ -214,14 +210,14 @@ export default {
       this.treeModal = true;
     },
     del(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
           API.productClassifyDel({ id: row.id, type: "1" }).then(() => {
-            this.msgSuccess(this.$t("deleteSuccess"));
+            this.msgSuccess("删除成功");
             this.getTree();
           });
         })

+ 26 - 49
src/views/product-material/spu/addSpu.vue

@@ -10,14 +10,8 @@
       >
         <el-row :gutter="10">
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.spu.spuCode')"
-              prop="code"
-            >
-              <el-input
-                v-model="form.code"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+            <el-form-item label="spu编码" prop="code">
+              <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="18">
@@ -28,57 +22,34 @@
         </el-row>
         <el-row>
           <el-col :span="18">
-            <el-form-item
-              :label="$t('product_material.spu.spuName')"
-              prop="name"
-            >
-              <el-input
-                v-model="form.name"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+            <el-form-item label="spu名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item
-          :label="$t('product_material.spu.spuDescription')"
-          prop="remark"
-        >
+        <el-form-item label="spu说明" prop="remark">
           <el-input
             v-model="form.remark"
             type="textarea"
             :rows="3"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入"
           ></el-input>
         </el-form-item>
-        <div style="margin-bottom: 20px">
-          <labelTitle
-            :content="$t('product_material.spu.associatedProducts')"
-          ></labelTitle>
+        <div style="margin-top: 20px">
+          <labelTitle content="关联产品"></labelTitle>
         </div>
         <el-form-item label-width="0px">
-          <el-button @click="selectDialog = true">
-            {{ $t("select") }}</el-button
-          >
+          <el-button size="mini" @click="selectDialog = true"> 选择</el-button>
         </el-form-item>
         <el-form-item>
           <el-table :data="form.productIdList">
-            <el-table-column
-              :label="$t('product_material.spu.productCode')"
-              prop="productCode"
-            >
+            <el-table-column label="产品编码" prop="productCode">
             </el-table-column>
-            <el-table-column
-              :label="$t('product_material.spu.productName')"
-              prop="productName"
-            >
+            <el-table-column label="产品名称" prop="productName">
             </el-table-column>
-            <el-table-column
-              :label="$t('operation')"
-              width="100"
-              align="center"
-            >
+            <el-table-column label="操作" width="100" align="center">
               <template slot-scope="scope">
-                <el-button type="text">{{ $t("delete") }}</el-button>
+                <el-button type="text">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -86,15 +57,13 @@
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
     <el-dialog
-      :title="$t('productSelect')"
+      title="关联产品"
       v-if="selectDialog"
       :visible.sync="selectDialog"
       width="80%"
@@ -133,7 +102,7 @@ export default {
         name: [
           {
             required: true,
-            message: this.$t("product_material.spu.spuNameRules"),
+            message: "请输入spu名称",
             trigger: "blur",
           },
         ],
@@ -163,7 +132,7 @@ export default {
         productCode: row.code,
         productName: row.name,
       });
-      this.msgSuccess(this.$t("addSuccess"));
+      this.msgSuccess("添加成功");
     },
   },
 };
@@ -176,4 +145,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 29 - 42
src/views/product-material/spu/index.vue

@@ -9,28 +9,17 @@
     ></query>
 
     <el-table :data="tableList" v-loading="loading">
-      <el-table-column
-        :label="$t('product_material.spu.spuCode')"
-        align="center"
-        prop="code"
-      />
-      <el-table-column
-        :label="$t('product_material.spu.spuName')"
-        align="center"
-        prop="name"
-      />
-      <el-table-column
-        :label="$t('product_material.spu.spuDescription')"
-        align="center"
-      />
+      <el-table-column label="spu编码" align="left" prop="code" width="150" />
+      <el-table-column label="spu名称" align="left" prop="name" width="180" />
+      <el-table-column label="spu说明" align="left" prop="remark" />
 
-      <el-table-column :label="$t('operation')" align="center" width="120">
+      <el-table-column label="操作" align="center" width="120">
         <template slot-scope="scope">
           <el-button type="text" @click="handleEdit(scope.row)"
-            >{{ $t("edit") }}
+            >修改
           </el-button>
           <el-button type="text" @click="handleDelete(scope.row)"
-            >{{ $t("delete") }}
+            >删除
           </el-button>
         </template>
       </el-table-column>
@@ -45,11 +34,7 @@
     />
 
     <el-dialog
-      :title="
-        titleText === 'add'
-          ? $t('product_material.spu.spuAdd')
-          : $t('product_material.spu.spuEdit')
-      "
+      :title="titleText === 'add' ? '添加spu' : '编辑spu'"
       :visible.sync="open"
       v-if="open"
       width="50%"
@@ -87,7 +72,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: this.$t("product_material.spu.spuAdd"),
+              name: "添加spu",
               methodsText: "add",
               type: "primary",
               add: () => {
@@ -115,20 +100,22 @@ export default {
   methods: {
     handleEdit(row) {
       this.titleText = "edit";
+      this.form = row;
+      this.form.productIdList = [];
       this.open = true;
-      this.$nextTick(() => {
-        this.$refs.addSpu.loading = true;
-        API.spuEdit({ id: row.id }).then(
-          (res) => {
-            this.form = res.data.data;
-            this.$refs.addSpu.loading = false;
-          },
-          (err) => {
-            console.log("spuEdit: " + err);
-            this.$refs.addSpu.loading = false;
-          }
-        );
-      });
+      // this.$nextTick(() => {
+      //   this.$refs.addSpu.loading = true;
+      //   API.spuEdit({ id: row.id }).then(
+      //     (res) => {
+      //       this.form = res.data.data;
+      //       this.$refs.addSpu.loading = false;
+      //     },
+      //     (err) => {
+      //       console.log("spuEdit: " + err);
+      //       this.$refs.addSpu.loading = false;
+      //     }
+      //   );
+      // });
     },
     getList() {
       this.loading = true;
@@ -168,7 +155,7 @@ export default {
       if (!this.form.id) {
         API.spuAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addSpu.loading = false;
             this.open = false;
             this.getList();
@@ -181,7 +168,7 @@ export default {
       } else {
         API.spuEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addSpu.loading = false;
             this.getList();
@@ -194,13 +181,13 @@ export default {
       }
     },
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
         API.spuDel({ id: row.id }).then(() => {
-          this.msgSuccess(this.$t("deleteSuccess"));
+          this.msgSuccess("删除成功");
           this.getList();
         });
       });

+ 47 - 132
src/views/product-material/supply/addSupply.vue

@@ -8,10 +8,7 @@
         :rules="formRules"
         label-width="100px"
       >
-        <el-form-item
-          :label="$t('product_material.supply.supplyType')"
-          prop="type"
-        >
+        <el-form-item label="供应商类型" prop="type">
           <el-radio-group v-model="form.type">
             <el-radio-button
               v-for="item in supplyTypeList"
@@ -25,35 +22,23 @@
 
         <el-row>
           <el-col :span="8">
-            <el-form-item
-              :label="$t('product_material.supply.supplyCode')"
-              prop="code"
-            >
-              <el-input
-                v-model="form.code"
-                :placeholder="$t('pleaseInput')"
-              ></el-input>
+            <el-form-item label="供应商编码" prop="code">
+              <el-input v-model="form.code" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
 
-        <el-form-item
-          :label="$t('product_material.supply.supplyName')"
-          prop="name"
-        >
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="供应商名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入"></el-input>
         </el-form-item>
 
-        <el-form-item :label="$t('product_material.supply.address')" required>
+        <el-form-item label="详细地址" required>
           <el-row :gutter="10">
             <el-col :span="8">
               <el-form-item label-width="0" prop="countryId">
                 <el-select
                   v-model="form.countryId"
-                  :placeholder="$t('product_material.supply.country')"
+                  placeholder="国家"
                   style="width: 100%"
                   @change="countryChange"
                 >
@@ -71,7 +56,7 @@
               <el-form-item label-width="0" prop="provinceId">
                 <el-select
                   v-model="form.provinceId"
-                  :placeholder="$t('product_material.supply.province')"
+                  placeholder="省/洲"
                   style="width: 100%"
                   @change="provinceChange"
                   :disabled="!provinceData.length > 0"
@@ -90,7 +75,7 @@
               <el-form-item label-width="0" prop="cityId">
                 <el-select
                   v-model="form.cityId"
-                  :placeholder="$t('product_material.supply.city')"
+                  placeholder="城市"
                   style="width: 100%"
                   :disabled="!provinceData.length > 0 && !cityData.length > 0"
                 >
@@ -107,55 +92,26 @@
           </el-row>
         </el-form-item>
 
-        <!-- <el-row>
-          <el-col :span="12">
-            <el-form-item
-              :label="$t('product_material.supply.supplyType')"
-              prop="type"
-            >
-              <el-select
-                v-model="form.type"
-                :placeholder="$t('pleaseSelect')"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row> -->
-
         <el-form-item label="" prop="detailedAddress">
           <el-input
             v-model="form.detailedAddress"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入详细地址"
             type="textarea"
             rows="4"
           ></el-input>
         </el-form-item>
 
-        <el-form-item
-          :label="$t('product_material.supply.contactInfo')"
-          required
-        >
+        <el-form-item label="联系信息" required>
           <el-row :gutter="10">
             <el-col :span="8">
               <el-form-item label-width="0" prop="contacts">
-                <el-input
-                  v-model="form.contacts"
-                  :placeholder="$t('pleaseInput')"
-                >
+                <el-input v-model="form.contacts" placeholder="请输入">
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item label-width="0" prop="phone">
-                <el-input v-model="form.phone" :placeholder="$t('pleaseInput')">
+                <el-input v-model="form.phone" placeholder="请输入">
                   <template>
                     <div slot="prepend">+ 86</div>
                   </template>
@@ -167,29 +123,23 @@
 
         <el-row :gutter="10">
           <el-col :span="8">
-            <el-form-item
-              :label="$t('product_material.supply.accountingPeriod')"
-              prop="accountPeriod"
-            >
+            <el-form-item label="账期" prop="accountPeriod">
               <el-input
                 v-model="form.accountPeriod"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item
-              :label="$t('product_material.supply.returnAndReplacementPeriod')"
-              prop="returnPeriod"
-            >
+            <el-form-item label="退换货期限" prop="returnPeriod">
               <el-input
                 v-model="form.returnPeriod"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item :label="$t('product_material.supply.enclosure')">
+        <el-form-item label="上传附件">
           <el-upload
             class="upload-demo"
             action="http://36.134.91.96:10001/api/service-file/uploadFile"
@@ -203,56 +153,31 @@
             <el-button size="small" type="primary">点击上传</el-button>
           </el-upload>
         </el-form-item>
-        <div style="margin-bottom: 20px">
-          <labelTitle
-            :content="$t('product_material.supply.backInfo')"
-          ></labelTitle>
+        <div style="margin-top: 20px">
+          <labelTitle content="银行信息"></labelTitle>
         </div>
 
-        <el-form-item
-          :label="$t('product_material.supply.accountName')"
-          prop="accountName"
-        >
-          <el-input
-            v-model="form.accountName"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="户名" prop="accountName">
+          <el-input v-model="form.accountName" placeholder="请输入"></el-input>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.supply.bankAccount')"
-          prop="bankAccount"
-        >
-          <el-input
-            v-model="form.bankAccount"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="银行账号" prop="bankAccount">
+          <el-input v-model="form.bankAccount" placeholder="请输入"></el-input>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.supply.bankOfDeposit')"
-          prop="bankOfDeposit"
-        >
+        <el-form-item label="开户银行" prop="bankOfDeposit">
           <el-input
             v-model="form.bankOfDeposit"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入"
           ></el-input>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.supply.bankNo')"
-          prop="interBankNo"
-        >
-          <el-input
-            v-model="form.interBankNo"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="联行号" prop="interBankNo">
+          <el-input v-model="form.interBankNo" placeholder="请输入"></el-input>
         </el-form-item>
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
   </div>
@@ -293,81 +218,63 @@ export default {
         countryId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.supply.countryRules"),
+            message: "请选择国家",
             trigger: "change",
           },
         ],
         provinceId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.supply.provinceIdRules"),
+            message: "请选择省/洲",
             trigger: "change",
           },
         ],
         cityId: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.supply.cityRules"),
+            message: "请选择城市",
             trigger: "change",
           },
         ],
         type: [
           {
             required: true,
-            message:
-              this.$t("pleaseSelect") +
-              this.$t("product_material.supply.supplyType"),
+            message: "请选择供应商类型",
             trigger: "change",
           },
         ],
         name: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.supply.supplyName"),
+            message: "请输入供应商名称",
             trigger: "blur",
           },
         ],
         contacts: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.supply.contacts"),
+            message: "请输入联系人",
             trigger: "blur",
           },
         ],
         phone: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.supply.contactNumber"),
+            message: "请输入联系电话",
             trigger: "blur",
           },
         ],
         accountPeriod: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.supply.accountingPeriod"),
+            message: "请输入账期",
             trigger: "blur",
           },
         ],
         returnPeriod: [
           {
             required: true,
-            message:
-              this.$t("pleaseInput") +
-              this.$t("product_material.supply.returnAndReplacementPeriod"),
+            message: "请输入退换货期限",
             trigger: "blur",
           },
         ],
@@ -420,4 +327,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 24 - 37
src/views/product-material/supply/addSupplyPrice.vue

@@ -8,13 +8,10 @@
         ref="form"
         label-width="100px"
       >
-        <el-form-item
-          :label="$t('product_material.supply.supplyName')"
-          prop="supplierId"
-        >
+        <el-form-item label="供应商名称" prop="supplierId">
           <el-select
             v-model="form.supplierId"
-            :placeholder="$t('pleaseSelect')"
+            placeholder="请选择"
             style="width: 100%"
           >
             <el-option
@@ -26,14 +23,14 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item :label="$t('product_material.product.product')" required>
+        <el-form-item label="产品" required>
           <el-row :gutter="10">
             <el-col :span="9">
               <el-form-item label-width="0px" prop="code">
                 <el-input
                   v-model="form.code"
                   disabled
-                  :placeholder="$t('product_material.product.productCode')"
+                  placeholder="产品编码"
                 ></el-input>
               </el-form-item>
             </el-col>
@@ -41,38 +38,30 @@
               <el-input
                 v-model="form.name"
                 disabled
-                :placeholder="$t('product_material.product.productName')"
+                placeholder="产品名称"
               ></el-input>
             </el-col>
             <el-col :span="3">
-              <el-button size="small" @click="selectDialog = true"
-                >{{ $t("select") }}
+              <el-button size="mini" @click="selectDialog = true"
+                >选择
               </el-button>
             </el-col>
           </el-row>
         </el-form-item>
-        <el-form-item
-          :label="$t('product_material.supply.priceMaintenance.price')"
-          prop="price"
-        >
-          <el-input
-            v-model="form.price"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="单价" prop="price">
+          <el-input v-model="form.price" placeholder="请输入"></el-input>
         </el-form-item>
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
 
     <el-dialog
-      :title="$t('productSelect')"
+      title="选择产品"
       v-if="selectDialog"
       :visible.sync="selectDialog"
       width="80%"
@@ -111,25 +100,15 @@ export default {
         supplierId: [
           {
             required: true,
-            message: this.$t(
-              "product_material.supply.priceMaintenance.supplierIdRules"
-            ),
+            message: "请选择供应商",
             trigger: "change",
           },
         ],
-        // code: [
-        //   {
-        //     required: true,
-        //     message: this.$t("product_material.supply.priceMaintenance.code"),
-        //     trigger: "blur",
-        //   },
-        // ],
+
         price: [
           {
             required: true,
-            message: this.$t(
-              "product_material.supply.priceMaintenance.priceRules"
-            ),
+            message: "请输入单价",
             trigger: "blur",
           },
         ],
@@ -157,7 +136,7 @@ export default {
       this.form.code = row.code;
       this.form.name = row.name;
       this.form.materialId = row.id;
-      this.msgSuccess(this.$t("addSuccess"));
+      this.msgSuccess("添加成功");
     },
   },
 };
@@ -170,4 +149,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 39 - 48
src/views/product-material/supply/index.vue

@@ -16,60 +16,51 @@
       ></query>
       <el-table :data="tableList" v-loading="loading">
         <el-table-column
-          :label="$t('product_material.supply.supplyType')"
-          align="center"
+          label="供应商类型"
+          align="left"
           prop="type"
+          width="140"
           :formatter="(row) => dictDataEcho(row.type, supplyTypeList)"
         />
         <el-table-column
-          :label="$t('product_material.supply.supplyCode')"
-          align="center"
+          label="供应商编码"
+          align="left"
           prop="code"
+          width="130"
         />
+        <el-table-column label="供应商名称" align="left" prop="name" />
         <el-table-column
-          :label="$t('product_material.supply.supplyName')"
-          align="center"
-          prop="name"
-        />
-        <el-table-column
-          :label="$t('product_material.supply.city')"
-          align="center"
+          label="所在城市"
+          align="left"
           :formatter="showAddress"
         />
         <el-table-column
-          :label="$t('product_material.supply.contacts')"
-          align="center"
+          label="联系人"
+          align="left"
           prop="contacts"
+          width="110"
         />
         <el-table-column
-          :label="$t('product_material.supply.accountingPeriod')"
-          align="center"
+          label="账期"
+          align="left"
           prop="accountPeriod"
+          width="100"
         />
 
-        <!-- <el-table-column
-          :label="$t('product_material.supply.contactNumber')"
-          align="center"
-          prop="applicationName"
-        /> -->
         <el-table-column
-          :label="$t('product_material.supply.returnAndReplacementPeriod')"
-          align="center"
+          label="退换货期限"
+          align="left"
           prop="returnPeriod"
+          width="120"
         />
-        <!-- <el-table-column
-          :label="$t('product_material.supply.enclosure')"
-          align="center"
-          prop="applicationName"
-        /> -->
 
-        <el-table-column :label="$t('operation')" align="center" width="120">
+        <el-table-column label="操作" align="center" width="120">
           <template slot-scope="scope">
             <el-button type="text" @click="handleEdit(scope.row)"
-              >{{ $t("edit") }}
+              >修改
             </el-button>
             <el-button type="text" @click="handleDelete(scope.row)"
-              >{{ $t("delete") }}
+              >删除
             </el-button>
           </template>
         </el-table-column>
@@ -143,7 +134,7 @@
                 >
                   <el-input
                     v-model="queryParams.code"
-                    :placeholder="$t('pleaseInput')"
+                    placeholder="请输入"
                   ></el-input>
                 </el-form-item>
               </el-col>
@@ -154,7 +145,7 @@
             >
               <el-input
                 v-model="queryParams.name"
-                :placeholder="$t('pleaseInput')"
+                placeholder="请输入"
               ></el-input>
             </el-form-item>
             <el-form-item :label="$t('product_material.supply.whereCity')">
@@ -220,7 +211,7 @@
                   <el-form-item prop="">
                     <el-input
                       v-model="queryParams.name"
-                      :placeholder="$t('pleaseInput')"
+                      placeholder="请输入"
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -229,7 +220,7 @@
                   <el-form-item prop="">
                     <el-input
                       v-model="queryParams.name"
-                      :placeholder="$t('pleaseInput')"
+                      placeholder="请输入"
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -243,7 +234,7 @@
                   <el-form-item prop="">
                     <el-input
                       v-model="queryParams.name"
-                      :placeholder="$t('pleaseInput')"
+                      placeholder="请输入"
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -252,7 +243,7 @@
                   <el-form-item prop="">
                     <el-input
                       v-model="queryParams.name"
-                      :placeholder="$t('pleaseInput')"
+                      placeholder="请输入"
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -266,7 +257,7 @@
             >{{ $t("reset") }}
           </el-button>
           <el-button type="primary" size="small" @click="handleQuery">
-            {{ $t("submit") }}</el-button
+            确定</el-button
           >
         </div>
       </el-dialog>
@@ -311,7 +302,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: this.$t("product_material.supply.supplyAdd"),
+              name: "添加供应商",
               methodsText: "add",
               type: "primary",
               add: () => {
@@ -319,7 +310,7 @@ export default {
               },
             },
             {
-              name: this.$t("excelImport"),
+              name: "Excel导入",
               methodsText: "excelImport",
               type: "defualt",
               excelImport: () => {
@@ -327,7 +318,7 @@ export default {
               },
             },
             {
-              name: this.$t("product_material.supply.supplyPriceMaintain"),
+              name: "供应商价格维护",
               methodsText: "go",
               type: "defualt",
               go: () => {
@@ -339,12 +330,12 @@ export default {
       },
       selectConfig: [
         {
-          label: this.$t("product_material.supply.supplyType"),
+          label: "供应商类型",
           prop: "type",
           data: [],
         },
         {
-          label: this.$t("product_material.supply.accountingPeriod"),
+          label: "有无账期",
           prop: "accountPeriodType",
           data: [],
         },
@@ -485,7 +476,7 @@ export default {
       if (!this.form.id) {
         API.supplyAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addSupply.loading = false;
             this.open = false;
             this.getList();
@@ -498,7 +489,7 @@ export default {
       } else {
         API.supplyEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addSupply.loading = false;
             this.getList();
@@ -512,13 +503,13 @@ export default {
     },
 
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
         API.supplyDel({ id: row.id }).then(() => {
-          this.msgSuccess(this.$t("deleteSuccess"));
+          this.msgSuccess("删除成功");
           this.getList();
         });
       });

+ 40 - 49
src/views/product-material/supply/priceMaintenance.vue

@@ -16,43 +16,40 @@
       ></query>
       <el-table :data="tableList" v-loading="loading">
         <el-table-column
-          :label="$t('product_material.supply.supplyType')"
-          align="center"
-          prop="applicationName"
+          label="供应商类型"
+          align="left"
+          prop="supplierId"
+          width="140"
         />
+        <el-table-column label="供应商名称" align="left" prop="supplierName" />
         <el-table-column
-          :label="$t('product_material.supply.supplyName')"
-          align="center"
-          prop="applicationName"
+          label="产品类型"
+          align="left"
+          prop="materialType"
+          width="100"
+          :formatter="(row) => dictDataEcho(row.materialType, productTypeList)"
         />
         <el-table-column
-          :label="$t('product_material.product.productType')"
-          align="center"
-          prop="applicationName"
+          label="产品编码"
+          align="left"
+          prop="materialCode"
+          width="150"
         />
+        <el-table-column label="产品名称" align="left" prop="materialName" />
         <el-table-column
-          :label="$t('product_material.product.productCode')"
-          align="center"
-          prop="applicationName"
-        />
-        <el-table-column
-          :label="$t('product_material.product.productName')"
-          align="center"
-          prop="applicationName"
-        />
-        <el-table-column
-          :label="$t('product_material.supply.priceMaintenance.supplyPrice')"
-          align="center"
-          prop="applicationName"
+          label="供应单价"
+          align="left"
+          prop="price"
+          width="120"
         />
 
-        <el-table-column :label="$t('operation')" align="center" width="120">
+        <el-table-column label="操作" align="center" width="120">
           <template slot-scope="scope">
             <el-button type="text" @click="handleEdit(scope.row)"
-              >{{ $t("edit") }}
+              >修改
             </el-button>
             <el-button type="text" @click="handleDelete(scope.row)"
-              >{{ $t("delete") }}
+              >删除
             </el-button>
           </template>
         </el-table-column>
@@ -67,11 +64,7 @@
       />
 
       <el-dialog
-        :title="
-          titleText === 'add'
-            ? $t('product_material.supply.priceMaintenance.supplyPriceAdd')
-            : $t('product_material.supply.priceMaintenance.supplyPriceEdit')
-        "
+        :title="titleText === 'add' ? '添加供应价格' : '编辑供应价格'"
         :visible.sync="open"
         v-if="open"
         width="50%"
@@ -106,7 +99,7 @@
               >
                 <el-select
                   v-model="queryParams.type"
-                  :placeholder="$t('pleaseSelect')"
+                  placeholder="请选择"
                   style="width: 100%"
                 >
                   <el-option
@@ -128,7 +121,7 @@
               >
                 <el-select
                   v-model="queryParams.type"
-                  :placeholder="$t('pleaseSelect')"
+                  placeholder="请选择"
                   style="width: 100%"
                 >
                   <el-option
@@ -149,7 +142,7 @@
           >
             <el-input
               v-model="queryParams.name"
-              :placeholder="$t('pleaseInput')"
+              placeholder="请输入"
             ></el-input>
           </el-form-item>
 
@@ -161,7 +154,7 @@
               >
                 <el-select
                   v-model="queryParams.type"
-                  :placeholder="$t('pleaseSelect')"
+                  placeholder="请选择"
                   style="width: 100%"
                 >
                   <el-option
@@ -178,10 +171,10 @@
 
           <div style="text-align: center">
             <el-button size="small" @click="queryDialog = false"
-              >{{ $t("cancel") }}
+              >"取消"
             </el-button>
             <el-button type="primary" size="small" @click="handleQuery">
-              {{ $t("submit") }}</el-button
+              确定</el-button
             >
           </div>
         </el-form>
@@ -224,9 +217,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: this.$t(
-                "product_material.supply.priceMaintenance.supplyPriceAdd"
-              ),
+              name: "添加供应价格",
               methodsText: "add",
               type: "primary",
               add: () => {
@@ -247,13 +238,13 @@ export default {
       },
       selectConfig: [
         {
-          label: this.$t("product_material.product.productType"),
-          prop: "type",
+          label: "产品类型",
+          prop: "materialType",
           data: [],
         },
         {
-          label: this.$t("product_material.supply.supplyType"),
-          prop: "type",
+          label: "供应商类型",
+          prop: "supplierId",
           data: [],
         },
       ],
@@ -349,7 +340,7 @@ export default {
       if (!this.form.id) {
         API.supplyPriceAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addSupplyPrice.loading = false;
             this.open = false;
             this.getList();
@@ -362,7 +353,7 @@ export default {
       } else {
         API.supplyPriceEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addSupplyPrice.loading = false;
             this.getList();
@@ -375,13 +366,13 @@ export default {
       }
     },
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
         API.supplyPriceDel({ id: row.id }).then(() => {
-          this.msgSuccess(this.$t("deleteSuccess"));
+          this.msgSuccess("删除成功");
           this.getList();
         });
       });

+ 21 - 31
src/views/product-material/warehouse/addWarehouse.vue

@@ -10,13 +10,10 @@
       >
         <el-row>
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.warehouse.warehouseType')"
-              prop="type"
-            >
+            <el-form-item label="仓库类型" prop="type">
               <el-select
                 v-model="form.type"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 style="width: 100%"
               >
                 <el-option
@@ -31,25 +28,16 @@
           </el-col>
         </el-row>
 
-        <el-form-item
-          :label="$t('product_material.warehouse.warehouseName')"
-          prop="name"
-        >
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('pleaseInput')"
-          ></el-input>
+        <el-form-item label="仓库名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入"></el-input>
         </el-form-item>
 
         <el-row>
           <el-col :span="6">
-            <el-form-item
-              :label="$t('product_material.warehouse.storekeeper')"
-              prop="warehouseKeeperId"
-            >
+            <el-form-item label="仓管员" prop="warehouseKeeperId">
               <el-select
                 v-model="form.warehouseKeeperId"
-                :placeholder="$t('pleaseSelect')"
+                placeholder="请选择"
                 style="width: 100%"
               >
                 <el-option
@@ -63,24 +51,20 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item
-          :label="$t('product_material.warehouse.warehouseDescription')"
-        >
+        <el-form-item label="仓库说明">
           <el-input
             v-model="form.remarks"
             type="textarea"
-            :placeholder="$t('pleaseInput')"
+            placeholder="请输入"
             :rows="4"
           ></el-input>
         </el-form-item>
       </el-form>
     </div>
     <div style="text-align: center; margin-top: 15px">
-      <el-button size="small" @click="handleCancel"
-        >{{ $t("cancel") }}
-      </el-button>
+      <el-button size="small" @click="handleCancel">取消 </el-button>
       <el-button type="primary" size="small" @click="handleSubmit">
-        {{ $t("submit") }}</el-button
+        确定</el-button
       >
     </div>
   </div>
@@ -117,16 +101,14 @@ export default {
         type: [
           {
             required: true,
-            message: this.$t("product_material.warehouse.warehouseTypeRules"),
+            message: "请选择仓库类型",
             trigger: "change",
           },
         ],
         warehouseKeeperId: [
           {
             required: true,
-            message: this.$t(
-              "product_material.warehouse.warehouseKeeperIdRules"
-            ),
+            message: "请选择仓管员",
             trigger: "change",
           },
         ],
@@ -134,7 +116,7 @@ export default {
         name: [
           {
             required: true,
-            message: this.$t("product_material.warehouse.warehouseNameRules"),
+            message: "请输入仓库名称",
             trigger: "blur",
           },
         ],
@@ -164,4 +146,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 20 - 30
src/views/product-material/warehouse/index.vue

@@ -16,35 +16,29 @@
 
     <el-table :data="tableList" v-loading="loading">
       <el-table-column
-        :label="$t('product_material.warehouse.warehouseType')"
-        align="center"
+        label="仓库类型"
+        align="left"
         prop="type"
+        width="180"
         :formatter="(row) => dictDataEcho(row.type, warehouseTypeList)"
       />
+      <el-table-column label="仓库名称" align="left" width="200" prop="name" />
       <el-table-column
-        :label="$t('product_material.warehouse.warehouseName')"
-        align="center"
-        prop="name"
-      />
-      <el-table-column
-        :label="$t('product_material.warehouse.storekeeper')"
-        align="center"
+        label="仓管员"
+        align="left"
         prop="warehouseKeeperId"
+        width="150"
         :formatter="showWarehouseKeeperId"
       />
-      <el-table-column
-        :label="$t('product_material.warehouse.warehouseDescription')"
-        align="center"
-        prop="remarks"
-      />
+      <el-table-column label="仓库说明" align="left" prop="remarks" />
 
-      <el-table-column :label="$t('operation')" align="center" width="120">
+      <el-table-column label="操作" align="center" width="120">
         <template slot-scope="scope">
           <el-button type="text" @click="handleEdit(scope.row)"
-            >{{ $t("edit") }}
+            >修改
           </el-button>
           <el-button type="text" @click="handleDelete(scope.row)"
-            >{{ $t("delete") }}
+            >删除
           </el-button>
         </template>
       </el-table-column>
@@ -59,11 +53,7 @@
     />
 
     <el-dialog
-      :title="
-        titleText === 'add'
-          ? $t('product_material.warehouse.warehouseAdd')
-          : $t('product_material.warehouse.warehouseEdit')
-      "
+      :title="titleText === 'add' ? '添加仓库' : '编辑仓库'"
       :visible.sync="open"
       v-if="open"
       width="50%"
@@ -101,7 +91,7 @@ export default {
       customerSelectList: [],
       selectConfig: [
         {
-          label: this.$t("product_material.warehouse.warehouseType"),
+          label: "仓库类型",
           prop: "type",
           data: [],
         },
@@ -116,7 +106,7 @@ export default {
         otherButton: {
           list: [
             {
-              name: this.$t("product_material.warehouse.warehouseAdd"),
+              name: "添加仓库",
               methodsText: "add",
               type: "primary",
               add: () => {
@@ -215,7 +205,7 @@ export default {
       if (!this.form.id) {
         API.warehouseAdd(this.form).then(
           () => {
-            this.msgSuccess(this.$t("addSuccess"));
+            this.msgSuccess("添加成功");
             this.$refs.addWarehouse.loading = false;
             this.open = false;
             this.getList();
@@ -228,7 +218,7 @@ export default {
       } else {
         API.warehouseEdit(this.form).then(
           () => {
-            this.msgSuccess(this.$t("editSuccess"));
+            this.msgSuccess("编辑成功");
             this.open = false;
             this.$refs.addWarehouse.loading = false;
             this.getList();
@@ -241,13 +231,13 @@ export default {
       }
     },
     handleDelete(row) {
-      this.$confirm(this.$t("askDeleteData"), {
-        confirmButtonText: this.$t("submitText"),
-        cancelButtonText: this.$t("cancelText"),
+      this.$confirm("请问是否删除该条数据 ?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
         API.warehouseDel({ id: row.id }).then(() => {
-          this.msgSuccess(this.$t("deleteSuccess"));
+          this.msgSuccess("删除成功");
           this.getList();
         });
       });

+ 8 - 0
src/views/purchase-management/deliver-goods/sendGoods.vue

@@ -195,4 +195,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/purchase-management/purchase/addPurchase.vue

@@ -297,4 +297,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 257 - 0
src/views/purchase-management/returnsManagement/addReturnsGoods.vue

@@ -0,0 +1,257 @@
+<template>
+  <div v-loading="loading">
+    <div class="form-box">
+      <el-form
+        label-position="top"
+        :model="form"
+        ref="form"
+        :rules="formRules"
+        label-width="100px"
+      >
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="供应商" prop="supplieId">
+              <el-select
+                v-model="form.supplieId"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in supplySelectList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                  <span style="float: left">{{
+                    `${item.name}(${dictDataEcho(item.type, supplyTypeList)})`
+                  }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="4">
+            <el-form-item label="采购单号" prop="supplieId">
+              <el-select
+                v-model="form.supplieId"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in supplySelectList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div style="margin-bottom: 20px">
+          <labelTitle content="到货明细"></labelTitle>
+        </div>
+
+        <el-form-item>
+          <el-table :data="form.goodsList">
+            <el-table-column
+              :label="$t('purchase_management.purchase.goodCode')"
+              prop="goodsCode"
+            >
+            </el-table-column>
+            <el-table-column
+              :label="$t('purchase_management.purchase.goodName')"
+              prop="goodsName"
+            >
+            </el-table-column>
+
+            <el-table-column label="到货数量" prop="goodsUnit">
+            </el-table-column>
+
+            <el-table-column label="退货数量" prop="price">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="'goodsList.' + scope.$index + '.price'"
+                  :rules="formRules.price"
+                  :inline-message="true"
+                  label-width="0"
+                >
+                  <el-input
+                    v-model="scope.row.unitPrice"
+                    :placeholder="$t('pleaseInput')"
+                    size="mini"
+                  >
+                  </el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="text-align: center; margin-top: 15px">
+      <el-button size="small" @click="handleCancel"
+        >{{ $t("cancel") }}
+      </el-button>
+      <el-button type="primary" size="small" @click="handleSubmit">
+        {{ $t("submit") }}</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import labelTitle from "@/components/label-title/index.vue";
+
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "addReturnsGoods",
+  components: { labelTitle },
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+    supplySelectList: {
+      type: Array,
+      default: () => [],
+    },
+    supplyTypeList: {
+      type: Array,
+      default: () => [],
+    },
+    productTypeList: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      uploadHeader: {
+        Authorization: "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+        "Blade-Auth": "bearer " + getToken(),
+      },
+
+      loading: false,
+      formRules: {
+        supplieId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.selectSupply"),
+            trigger: "change",
+          },
+        ],
+        planArrivalTime: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.askArrivalTime"),
+            trigger: "change",
+          },
+        ],
+        countryId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.country"),
+            trigger: "change",
+          },
+        ],
+        provinceId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.province"),
+            trigger: "change",
+          },
+        ],
+        cityId: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.city"),
+            trigger: "change",
+          },
+        ],
+        type: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseSelect") +
+              this.$t("purchase_management.purchase.purchaseType"),
+            trigger: "change",
+          },
+        ],
+        name: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.purchaseName"),
+            trigger: "blur",
+          },
+        ],
+        contacts: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.contacts"),
+            trigger: "blur",
+          },
+        ],
+        phone: [
+          {
+            required: true,
+            message:
+              this.$t("pleaseInput") +
+              this.$t("purchase_management.purchase.contactNumber"),
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  created() {},
+  methods: {
+    handleSubmit() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          this.$emit("submit");
+        }
+      });
+    },
+    handleCancel() {
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-box {
+  height: calc(100vh - 280px);
+  overflow: auto;
+  box-sizing: border-box;
+  padding: 10px;
+}
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
+</style>

+ 269 - 0
src/views/purchase-management/returnsManagement/index.vue

@@ -0,0 +1,269 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import byTable from "@/components/by-table/index.js";
+import addReturnsGoods from "./addReturnsGoods.vue";
+import { supplySelect } from "@/api/product-material/supply/index.js";
+
+export default {
+  components: {
+    test,
+    byTable,
+    query,
+    addReturnsGoods,
+  },
+  data() {
+    return {
+      supplyTypeList: [],
+      supplySelectList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "新增退货",
+              methodsText: "add",
+              type: "primary",
+              add: () => {
+                this.handleAdd();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        keyword: "",
+        warehouseId: "",
+        status: "",
+        code: "",
+        goodsCode: "",
+        goodsName: "",
+        applyUserId: "",
+        startTime: "",
+        endTime: "",
+      },
+      selectConfig: [
+        {
+          label: "退款状态",
+          prop: "type",
+          data: [],
+        },
+      ],
+      tableList: [],
+      loading: false,
+      titleText: "新增退货",
+      open: false,
+      form: {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [{}],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+
+    this.supplyTypeList = businessDictData.find(
+      (item) => item.code === "supplyType"
+    ).children;
+
+    supplySelect({ name: "", code: "", type: "" }).then((res) => {
+      this.supplySelectList = res.data.data;
+    });
+    // this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.outboundList(this.queryParams).then(
+        (res) => {
+          console.log(res, "qq");
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("outboundList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleAdd() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        id: "",
+        receiptWarehouseId: "",
+        planArrivalTime: "",
+        cause: "",
+        goodsId: [],
+      };
+      this.open = false;
+    },
+    handleEdit(row) {
+      this.form = row;
+      this.open = true;
+      if (this.form.fileInfoList === "") {
+        this.form.fileInfoList = [];
+      }
+      this.$nextTick(() => {
+        this.$refs.addCustomer.loading = true;
+        this.$refs.addCustomer.countryChange(this.form.countryId);
+        this.$refs.addCustomer.provinceChange(this.form.provinceId);
+        this.$refs.addCustomer.loading = false;
+      });
+    },
+    handleSubmit() {
+      if (!this.form.id) {
+        API.outboundAdd(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("addSuccess"));
+            this.$refs.addCustomer.loading = false;
+            this.open = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundAdd: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      } else {
+        API.outboundEdit(this.form).then(
+          () => {
+            this.msgSuccess(this.$t("editSuccess"));
+            this.open = false;
+            this.$refs.addCustomer.loading = false;
+            this.getList();
+          },
+          (err) => {
+            console.log("outboundEdit: " + err);
+            this.$refs.addCustomer.loading = false;
+          }
+        );
+      }
+    },
+
+    handleDelete(row) {
+      this.$confirm(this.$t("askDeleteData"), {
+        confirmButtonText: this.$t("submitText"),
+        cancelButtonText: this.$t("cancelText"),
+        type: "warning",
+      }).then(() => {
+        API.outboundDel({ id: row.id }).then(() => {
+          this.msgSuccess(this.$t("deleteSuccess"));
+          this.getList();
+        });
+      });
+    },
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card>
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column label="退货单号" align="center" prop="code" />
+
+        <el-table-column label="采购单号" align="center" prop="code" />
+        <el-table-column label="供应商" align="center" prop="name" />
+        <el-table-column
+          label="退货总金额"
+          align="center"
+          :formatter="showAddress"
+        />
+        <el-table-column label="操作人" align="center" prop="contacts" />
+        <el-table-column label="操作时间" align="center" prop="phone" />
+        <el-table-column label="退款时间" align="center" prop="phone" />
+
+        <el-table-column label="操作" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button type="text" @click="handleEdit(scope.row)"
+              >结束
+            </el-button>
+            <el-button type="text" @click="handleDelete(scope.row)"
+              >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <add-returns-goods
+        :form="form"
+        :supplyTypeList="supplyTypeList"
+        :supplySelectList="supplySelectList"
+        :productTypeList="productTypeList"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="addReturnsGoods"
+      ></add-returns-goods>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  .header {
+    // height: 100px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+  }
+  .body-main {
+    flex: 1;
+  }
+}
+</style>

+ 8 - 0
src/views/purchase-management/settlement/sendPurchaseSettlement.vue

@@ -147,4 +147,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>

+ 8 - 0
src/views/purchase-management/subscribe/sendSubscribe.vue

@@ -347,4 +347,12 @@ export default {
   box-sizing: border-box;
   padding: 10px;
 }
+::v-deep {
+  .el-form-item {
+    margin-bottom: 3px;
+  }
+  .el-form--label-top .el-form-item__label {
+    padding: 8px 0 0 0;
+  }
+}
 </style>