戴艳蓉 3 years ago
parent
commit
f39ec7d0eb

+ 2 - 1
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -842,7 +842,7 @@
     </el-row>
     <el-row class="ddiv">
       <el-col :span="1" class="dtitle">
-        <ul style="padding: 30px 0 0 0">
+        <ul style="padding: 20px 0 0 0">
           <li>固</li>
           <li>定</li>
           <li>成</li>
@@ -1016,6 +1016,7 @@
               <el-table-column
                 fixed="right"
                 v-if="type === 'add' || type === 'editCoin' || type === 'edit'"
+                width="80px"
               >
                 <template slot="header" slot-scope="scope">
                   <span>操作</span>

+ 23 - 10
src/views/purchaseIn/purchaseOrder/components/ShowDataTableColumns.js

@@ -31,11 +31,7 @@ export default [
     label: "购买方公司",
     _slot_: "supplier_name1",
   },
-  {
-    prop: "good_name",
-    label: "商品名称",
-    _slot_: "good_name",
-  },
+
   {
     prop: "wsm",
     label: "仓库信息",
@@ -46,8 +42,15 @@ export default [
     label: "商品分类",
   },
   {
-    prop: "good_price",
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24
+  },
+  {
+    prop: "brand_name",
     label: "品牌",
+    _slot_: "brand_name",
     span: 6
   },
   {
@@ -75,13 +78,23 @@ export default [
     label: "未发货数量",
     span: 6
   },
-
-
-
+  {
+    prop: "exclusive",
+    label: "专属类型",
+    _slot_: "exclusive",
+    span: 6
+  },
+  {
+    prop: "weight",
+    label: "商品总重",
+    _slot_: "weight",
+    span: 6
+  },
 
   {
     prop: "remark",
-    label: "备注",
+    label: "贵金属信息",
+    _slot_: "remark",
     span: 24
   },
 

+ 2 - 2
src/views/purchaseIn/purchaseOrder/components/order-in-table.vue

@@ -32,8 +32,8 @@
                 class="fr"
                 style="margin: 3px 0 0 0"
                 v-if="
-                  (status === '1' && powers.some((item) => item == '028')) ||
-                  (status === '2' && powers.some((item) => item == '028'))
+                  (status === '0' && powers.some((item) => item == '028')) ||
+                  (status === '1' && powers.some((item) => item == '028'))
                 "
                 effect="dark"
                 content="添加"

+ 83 - 30
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -45,10 +45,7 @@
                         ><span>{{ sitem.supplierNo }}</span>
                       </li>
                     </ul>
-                    <i
-                      class="el-icon-warning-outline fr"
-                      slot="reference"
-                    ></i>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>
                 <template slot="supplier_name1">
@@ -60,25 +57,67 @@
                         ><span>{{ sitem.supplierNo }}</span>
                       </li>
                     </ul>
-                    <i
-                      class="el-icon-warning-outline fr"
-                      slot="reference"
-                    ></i>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>
                 <template slot="good_name">
-                  <span>{{ sitem.good_name }}</span>
-                  <el-popover placement="top" width="300" trigger="hover">
-                    <ul>
-                      <li>
-                        <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
-                      </li>
-                    </ul>
-                    <i
-                      class="el-icon-warning-outline fr my-class"
-                      slot="reference"
-                    ></i>
-                  </el-popover>
+                  <span v-if="sitem.goodinfo">
+                    <img
+                      style="display: inline-block; width: 20px; height: 20px"
+                      class="hover fl"
+                      v-viewer
+                      v-if="sitem.goodinfo.good_thumb_img"
+                      :src="sitem.goodinfo.good_thumb_img"
+                      alt=""
+                    />
+                    <span style="padding: 0 0 0 5px">{{
+                      sitem.goodinfo.good_name
+                    }}</span>
+                    <span
+                      v-for="(si, sii) in sitem.goodinfo.speclist"
+                      :key="sii + si.id"
+                    >
+                      <span>{{ sii === 0 ? "_" : "--" }}</span
+                      ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+                    </span>
+                    <el-popover placement="top" width="300" trigger="hover">
+                      <ul>
+                        <li>
+                          <span>商品编号:</span
+                          ><span>{{ sitem.spuCode }}</span>
+                        </li>
+                      </ul>
+                      <i
+                        class="el-icon-warning-outline fr my-class"
+                        slot="reference"
+                      ></i>
+                    </el-popover>
+                  </span>
+                </template>
+                <template slot="brand_name">
+                  <span v-if="sitem.goodinfo">{{
+                    sitem.goodinfo.brand_name
+                  }}</span>
+                </template>
+                <template slot="exclusive">
+                  <span
+                    v-if="
+                      sitem.goodinfo &&
+                      sitem.goodinfo.exclusive &&
+                      sitem.goodinfo.exclusive.length > 0
+                    "
+                  >
+                    <span
+                      v-for="(si, sii) in sitem.goodinfo.exclusive"
+                      :key="si.id + sii"
+                    >
+                      <span v-if="sii !== 0">/</span><span>{{ si.name }}</span>
+                    </span> </span
+                  ><span v-else>--</span>
+                </template>
+                <template slot="weight">
+                  <span v-if="sitem.goodinfo">{{ sitem.goodinfo.weight }}</span
+                  >/g
                 </template>
                 <template slot="status">
                   <el-tag
@@ -107,12 +146,28 @@
                         ><span>{{ sitem.wsm_code }}</span>
                       </li>
                     </ul>
-                    <i
-                      class="el-icon-warning-outline fr"
-                      slot="reference"
-                    ></i>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>
+                <template slot="remark">
+                  <span v-if="sitem.goodinfo && sitem.goodinfo.noble_metal"
+                    >{{
+                      sitem.goodinfo.noble_weight
+                        ? sitem.goodinfo.noble_weight
+                        : "0"
+                    }}g-{{ sitem.goodinfo.noble_name }}-{{
+                      sitem.goodinfo.gold_price
+                        ? sitem.goodinfo.gold_price
+                        : "0"
+                    }}元/g-{{
+                      sitem.goodinfo.is_gold_price === "0" ? "不" : ""
+                    }}启用实时金价-{{
+                      sitem.goodinfo.is_diff === "1" ? "有" : "无"
+                    }}工差-{{ sitem.goodinfo.config }}-{{
+                      sitem.goodinfo.other_config
+                    }}</span
+                  >
+                </template>
               </show-data-table>
             </el-collapse-item>
             <el-collapse-item title="入库单" name="2">
@@ -164,8 +219,6 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
 import orderInTable from "./components/order-in-table";
 import ShowDataTableColumns from "./components/ShowDataTableColumns";
-// import diffOrderAdd from "@/views/purchaseIn/purchaseDiffOrder/addEditModel";
-// import WorkDiffTable from "./components/workDiff-table.vue";
 import orderAddeditModel from "./components/order-addedit-model";
 export default {
   name: "purchaseOrderDetail",
@@ -200,10 +253,10 @@ export default {
       activeNames: ["0", "1", "2", "3", "4", "5", "10"],
       sitem: null,
       statusOptions: [
-        { value: "0", label: "待同意开始入库" },
-        { value: "1", label: "待入库" },
-        { value: "2", label: "部分入库" },
-        { value: "3", label: "入库完成" },
+        { value: "0", label: "待发货" },
+        { value: "1", label: "部分发货" },
+        { value: "2", label: "发货完成" },
+        { value: "3", label: "已取消订单" },
       ],
       statusList: [
         {

+ 4 - 4
src/views/purchaseIn/purchaseOrder/index.vue

@@ -241,19 +241,19 @@ export default {
       statusOptions: [
         {
           code: "0",
-          label: "待同意发货",
+          label: "待发货",
         },
         {
           code: "1",
-          label: "发货",
+          label: "部分发货",
         },
         {
           code: "2",
-          label: "部分发货",
+          label: "发货完成",
         },
         {
           code: "3",
-          label: "发货完成",
+          label: "已取消订单",
         },
       ],
 

+ 102 - 64
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-addEdit-form.vue

@@ -4,12 +4,13 @@
     :model="ruleForm"
     :rules="rules"
     status-icon
+    :size="'small'"
     ref="ruleForm"
     label-width="85px"
     class="demo-ruleForm"
   >
     <el-row>
-      <el-col :span="id === 'add' ? 24 : 12">
+      <el-col :span="id === 'add' ? 12 : 12">
         <el-form-item label="可入库总数" prop="wsend_num">
           <el-input
             disabled
@@ -19,17 +20,61 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12">
+      <el-col :span="id === 'add' ? 12 : 12">
         <el-form-item label="入库数量" prop="send_num">
-          <el-input
+          <digital-input
+            :values="ruleForm.send_num"
+            :placeholder="'入库数量'"
+            :min="0"
+            :name="'ruleForm.send_num'"
             :disabled="id !== 'add'"
-            placeholder="入库数量"
-            v-model="ruleForm.send_num"
-            maxlength="100"
+            :max="ruleForm.wsend_num"
+            :position="'right'"
+            :precision="0"
+            :size="'small'"
+            :controls="false"
+            :append="''"
+            @reschange="number_change($event, 'send_num')"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="id === 'add' ? 12 : 12">
+        <el-form-item label="发货方式" prop="sendtype">
+          <el-select
+            v-model="ruleForm.sendtype"
+            style="width: 100%"
+            :disabled="id !== 'add'"
+            placeholder="发货方式"
+          >
+            <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-col :span="id === 'add' ? 12 : 12">
+        <el-form-item label="物流费用" prop="post_fee">
+          <digital-input
+            :values="ruleForm.post_fee"
+            :placeholder="'物流费用'"
+            :min="0"
+            :name="'ruleForm.post_fee'"
+            :disabled="id !== 'add'"
+            :max="ruleForm.post_fee"
+            :position="'right'"
+            :precision="2"
+            :size="'small'"
+            :controls="false"
+            :append="'元'"
+            @reschange="number_change($event, 'post_fee')"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12">
+      <el-col :span="id === 'add' ? 24 : 12" v-show="ruleForm.sendtype === '1'">
         <el-form-item label="物流公司" prop="post_company">
           <search-express
             :disabled="id !== 'add'"
@@ -41,7 +86,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12">
+      <el-col :span="id === 'add' ? 24 : 12" v-show="ruleForm.sendtype === '1'">
         <el-form-item label="物流单号" prop="post_code">
           <el-input
             :disabled="id !== 'add'"
@@ -51,19 +96,8 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="id === 'add' ? 24 : 12">
-        <el-form-item label="物流费用" prop="post_fee">
-          <el-input
-            :disabled="id !== 'add'"
-            placeholder="物流费用"
-            v-model="ruleForm.post_fee"
-            maxlength="100"
-          >
-            <template slot="append">元</template>
-          </el-input>
-        </el-form-item>
-      </el-col>
-      <el-col :span="id === 'add' ? 24 : 12">
+
+      <el-col :span="id === 'add' ? 12 : 12">
         <el-form-item label="发货时间" prop="post_time">
           <el-date-picker
             :disabled="id !== 'add'"
@@ -78,7 +112,7 @@
           </el-date-picker>
         </el-form-item>
       </el-col>
-      <el-col :span="24" style="text-align: right" v-if="id === 'add'">
+      <el-col :span="12" style="text-align: right" v-if="id === 'add'">
         <el-button type="primary" :size="'mini'" @click="submitForm"
           >保 存
         </el-button>
@@ -95,28 +129,29 @@ export default {
   props: ["id", "sitem", "newTime", "modelSitem"],
   mixins: [resToken],
   data() {
-    const validatePrice = (rule, value, callback) => {
-      if (value === "") {
+    const validate_num = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
         callback(new Error("不能为空!"));
       } else {
-        if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
-          callback();
-        } else {
-          callback(new Error("仅支持整数或两位小数!"));
-        }
+        callback();
       }
     };
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
+    const validate_num_0 = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
+      } else if (
+        required &&
+        (value === "0" ||
+          value === "0." ||
+          value === "0.0" ||
+          value === "0.00" ||
+          value === "0.000")
+      ) {
+        callback(new Error("不能为零!"));
       } else {
-        if (!isnumber(value)) {
-          callback(new Error("仅支持整数!"));
-        } else {
-          callback();
-        }
+        callback();
       }
     };
     const validateCode = (rule, value, callback) => {
@@ -146,10 +181,25 @@ export default {
         send_num: "",
         status: "1",
       },
+      options: [
+        {
+          value: "1",
+          label: "公司自提",
+        },
+        {
+          value: "2",
+          label: "供应商包邮",
+        },
+      ],
+      pickerOptions: {
+        disabledDate: (time) => {
+          return time.getTime() > new Date().valueOf();
+        },
+      },
       rules: {
         send_num: {
           required: true,
-          validator: validateWeight,
+          validator: validate_num_0,
           trigger: "blur",
         },
         post_company: {
@@ -158,6 +208,11 @@ export default {
           trigger: "change",
           message: "请输入物流公司",
         },
+        sendtype: {
+          required: true,
+          trigger: "change",
+          message: "选择发货方式",
+        },
         post_code: {
           required: true,
           validator: validateCode,
@@ -165,7 +220,7 @@ export default {
         },
         post_fee: {
           required: true,
-          validator: validatePrice,
+          validator: validate_num,
           trigger: "blur",
         },
         post_time: {
@@ -209,6 +264,7 @@ export default {
               wsm_code,
               send_num,
               wsend_num,
+              sendtype,
             } = this.sitem;
             this.ruleForm = {
               // wsm_mobile,
@@ -221,37 +277,19 @@ export default {
               post_code: post_code || "",
               post_fee: post_fee || "",
               post_time: sendtime || "",
+              sendtype: sendtype || "1",
               send_num: send_num || "",
               status: "1",
             };
           }
           console.log(this.sitem);
-
-          // const {
-          //   wsm_mobile,
-          //   wsm_contactor,
-          //   wsm_addr,
-          //   wsend_num,
-          //   cgdNo,
-          //   wsm_code,
-          // } = this.modelSitem;
-          // this.ruleForm = {
-          //   wsm_mobile,
-          //   wsm_contactor,
-          //   wsm_addr,
-          //   wsend_num,
-          //   cgdNo: cgdNo || "",
-          //   wsm_code: wsm_code || "",
-          //   post_company: [post_company] || [],
-          //   post_code: post_code || "",
-          //   post_fee: post_fee || "",
-          //   post_time: sendtime || "",
-          //   send_num: send_num || "",
-          //   status: "1",
-          // };
         }
       });
     },
+    number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
+    },
     // 保存更改
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {

+ 2 - 2
src/views/purchaseIn/wsmInOrder/components/wsm-in-order-model.vue

@@ -3,8 +3,8 @@
     :title="'新建备货入库单'"
     :center="true"
     align="left"
-    top="5vh"
-    width="500px"
+    top="15vh"
+    width="700px"
     @close="showModelThis = false"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"