Просмотр исходного кода

Revert "Revert "采购信息调整""

This reverts commit 99b0c08bd20b9a9f8dfb066df78362a8d02d3c81.
yijing 1 год назад
Родитель
Сommit
53740e8d0f

+ 1 - 0
src/enum/dict.js

@@ -15,6 +15,7 @@ export default {
   运维计划状态: 'plan_status',
   紧急程度: 'urgent_type',
   计量单位: 'measuring_uint',
+  周期单位: 'periodic_unit',
   包装单位: 'packing_unit',
   体积单位: 'volume_unit',
   重量单位: 'weight_unit',

+ 8 - 34
src/views/material/product/components/PurchasingInfo.vue

@@ -15,23 +15,16 @@
               v-model="form.purchasingCycle"
               placeholder="请输入"
               :min="0"
-              :precision="1"
               :controls="false"
               style="width: calc(100% - 100px)"
             />
-            <el-select
+            <DictSelection
+              dictName="周期单位"
+              clearable
               v-model="form.purchasingCycleUnit"
-              placeholder="请选择"
               style="width: 100px"
             >
-              <el-option
-                v-for="item in CycleUnitoptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
+            </DictSelection>
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -41,7 +34,6 @@
               v-model="form.purchaseMultiplier"
               placeholder="请输入"
               :min="0"
-              :precision="2"
               :controls="false"
             />
           </el-form-item>
@@ -49,21 +41,17 @@
         <el-col :span="8">
           <el-form-item label="最低订购量" prop="minimumOrderQuantity">
             <el-input-number
-              style="width: 100%"
               v-model="form.minimumOrderQuantity"
               placeholder="请输入"
               :min="0"
-              :precision="2"
               :controls="false"
+              style="width: calc(100% - 100px)"
             />
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item label="计量单位" prop="purchasingCycle">
             <DictSelection
               dictName="计量单位"
               clearable
               v-model="form.measuringUnit"
+              style="width: 100px"
             >
             </DictSelection>
           </el-form-item>
@@ -102,25 +90,11 @@
     },
     components: { deptSelect, personSelect },
     data() {
-      return {
-        CycleUnitoptions: [
-          {
-            value: '年',
-            label: '年'
-          },
-          {
-            value: '月',
-            label: '月'
-          },
-          {
-            value: '日',
-            label: '日'
-          }
-        ]
-      };
+      return {};
     },
     watch: {
       form(data) {
+        console.log(data, 'data');
         if (data.checkDepart) {
           const params = { executeGroupId: data.checkDepart };
           this.$nextTick(() => {

+ 5 - 2
src/views/material/product/detail.vue

@@ -494,8 +494,11 @@
     },
     methods: {
       changeUnit() {
-        if (this.form.measuringUnit && this.form.packingUnit) {
-          this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
+        if (this.form.measuringUnit) {
+          this.categoryPurchase.measuringUnit = this.form.measuringUnit;
+          if (this.form.packingUnit) {
+            this.$refs.warehouseRefs.defaultBuild(this.form.packingUnit);
+          }
         }
       },
       changePackagingSpecification(val) {

+ 7 - 3
vue.config.js

@@ -1,7 +1,11 @@
 const CompressionWebpackPlugin = require('compression-webpack-plugin');
-const { transformElementScss } = require('ele-admin/lib/utils/dynamic-theme');
+const {
+  transformElementScss
+} = require('ele-admin/lib/utils/dynamic-theme');
 const path = require('path');
-const { name } = require('./package.json');
+const {
+  name
+} = require('./package.json');
 
 function resolve(dir) {
   return path.join(__dirname, dir);
@@ -32,7 +36,7 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域