戴艳蓉 преди 3 години
родител
ревизия
970e055002

+ 2 - 0
src/apis/service/sellOut/sellOutOrder/index.js

@@ -14,6 +14,8 @@ export default {
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改状态
   status: (data, params) => http(api + "salestatus", data, "post", params),
+  // 库管发货
+  saleoutsend: (data, params) => http(api + "saleoutsend", data, "post", params),
   // 
   salecustomer: (data, params) => http(api + "salecustomer", data, "post", params),
   // 异常原因接口

+ 1 - 1
src/views/goodStore/goodsOnline/detail.vue

@@ -161,7 +161,7 @@
                         <span>供应商编号:</span
                         ><span>{{ sitem.supplierNo }}</span>
                       </li>
-                    </ul>
+                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>

+ 17 - 13
src/views/sellOut/salesOrder/components/ShowDataTableColumns.js

@@ -86,30 +86,32 @@ const showColumns = [
   {
     prop: "supplierName",
     label: "销售方公司",
+    _slot_: "supplierName",
     span: 12,
   },
   {
     prop: "companyName",
-    label: "企业客户",
+    label: "购买方公司",
+    _slot_: "companyName",
     span: 12,
   },
   {
     prop: "good_name",
     label: "商品名称",
     _slot_: "good_name",
-    span: 12,
+    span: 24,
   },
 
-  {
-    prop: "good_code",
-    label: "SPU编号",
-    span: 6,
-  },
-  {
-    prop: "skuCode",
-    label: "SKU编号",
-    span: 6,
-  },
+  // {
+  //   prop: "good_code",
+  //   label: "SPU编号",
+  //   span: 6,
+  // },
+  // {
+  //   prop: "skuCode",
+  //   label: "SKU编号",
+  //   span: 6,
+  // },
   {
     prop: "cat",
     label: "分类",
@@ -119,6 +121,7 @@ const showColumns = [
   {
     prop: "brand_name",
     label: "品牌",
+    _slot_: "brand_name",
     span: 8,
   },
   {
@@ -249,8 +252,9 @@ const showColumns = [
     span: 24,
   },
   {
-    prop: "remark",
+    prop: "weight",
     label: "其他信息",
+    _slot_: "weight",
     span: 24,
   },
 ]

+ 72 - 10
src/views/sellOut/salesOrder/detail.vue

@@ -5,11 +5,9 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
       <div>
-        <span>订单编号:</span
-        ><span v-if="sitem">{{ sitem.orderCode }}</span>
-         <!-- v-if="status === '4' && powers.some((item) => item == '051')" -->
+        <span>订单编号:</span><span v-if="sitem">{{ sitem.orderCode }}</span>
+        <!-- v-if="status === '4' && powers.some((item) => item == '051')" -->
         <el-button
-         
           style="margin: 0 0 0 10px"
           class="fr"
           type="primary"
@@ -43,17 +41,81 @@
                     v-viewer
                     style="width: 23px; height: 23px; margin: 0 5px 0 0"
                     class="fl"
-                    v-if="sitem.good_thumb_img"
-                    :src="sitem.good_thumb_img"
+                    v-if="
+                      sitem && sitem.goodinfo && sitem.goodinfo.good_thumb_img
+                    "
+                    :src="sitem.goodinfo.good_thumb_img"
                     alt=""
                   />
                   <span>{{ sitem.good_name }}</span>
-                  <span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
-                    <span>{{ i === 0 ? "--" : "__" }}</span
-                    ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+                  <template
+                    v-if="sitem && sitem.goodinfo && sitem.goodinfo.speclist"
+                  >
+                    <span
+                      v-for="(si, i) in sitem.goodinfo.speclist"
+                      :key="si.spec_id + i"
+                    >
+                      <span>{{ i === 0 ? "--" : "__" }}</span
+                      ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+                    </span>
+                  </template>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li
+                        v-if="sitem && sitem.goodinfo && sitem.goodinfo.skuCode"
+                      >
+                        <span>SKU编号:</span
+                        ><span>{{ sitem.goodinfo.skuCode }}</span>
+                      </li>
+                      <li
+                        v-if="
+                          sitem && sitem.goodinfo && sitem.goodinfo.good_code
+                        "
+                      >
+                        <span>SPU编号:</span
+                        ><span>{{ sitem.goodinfo.good_code }}</span>
+                      </li>
+                      <li
+                        v-if="
+                          sitem && sitem.goodinfo && sitem.goodinfo.plat_code
+                        "
+                      >
+                        <span>平台商品编号:</span
+                        ><span>{{ sitem.goodinfo.plat_code }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="supplierName">
+                  <span>{{ sitem.supplierName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>销售方公司编号:</span
+                        ><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="companyName">
+                  <span>{{ sitem.companyName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>购买方公司编号:</span
+                        ><span>{{ sitem.companyNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="brand_name">
+                  <span v-if="sitem && sitem.goodinfo"
+                    >{{ sitem.goodinfo.brand_name }}
                   </span>
                 </template>
-              
                 <template slot="cat">
                   <span v-for="(si, sii) in sitem.can" :key="si.id"
                     ><span v-if="sii !== 0">_</span><span>{{ si.name }}</span>

+ 1 - 10
src/views/sellOut/sellAfterApply/components/addEditForm.vue

@@ -10,15 +10,6 @@
     class="demo-ruleForm"
   >
     <el-row>
-      <!-- <el-col :span="8">
-        <el-form-item label="发货总量" prop="send_num">
-          <el-input
-            disabled
-            v-model="ruleForm.send_num"
-            placeholder="发货总量"
-          ></el-input>
-        </el-form-item>
-      </el-col> -->
       <el-col :span="12">
         <el-form-item label="异常数量" prop="error_num">
           <el-input
@@ -66,7 +57,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="异常备注" prop="error_remark">
+        <el-form-item label="异常备注1" prop="error_remark">
           <el-input
             type="textarea"
             :rows="7"

+ 30 - 18
src/views/sellOut/sellOutOrder/ShowDataTableColumns.js

@@ -2,29 +2,26 @@ export default [
   {
     prop: "outCode",
     label: "发货申请单号",
-    span:6
+    span: 6
   },
   {
     prop: "status",
     label: "出库单状态",
     _slot_: "status",
-    span:6
+    span: 6
   },
   {
     prop: "orderCode",
     label: "订单编号",
-    span:6
+    span: 6
   },
   {
     prop: "order_type",
     label: "订单类别",
     _slot_: "order_type",
-    span:6
-  },
-  {
-    prop: "apply_name",
-    label: "申请人"
+    span: 6
   },
+
   {
     prop: "class_cat",
     label: "商品分类",
@@ -33,8 +30,13 @@ export default [
   {
     prop: "good_code",
     label: "商品编码",
+    span: 6
+  },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    span: 6
   },
-
   {
     prop: "good_name",
     label: "商品名称",
@@ -43,48 +45,64 @@ export default [
   {
     prop: "post_name",
     label: "快递公司",
+    span: 6
   },
   {
     prop: "post_code",
     label: "物流编号",
+    span: 6
   },
   {
     prop: "post_fee",
     label: "物流费用",
+    span: 6
   },
   {
     prop: "sendtime",
     label: "发货时间",
+    span: 6
   },
 
   {
     prop: "send_num",
     label: "发货数量",
+    span: 6
   },
- {
+  {
     prop: "check_num",
     label: "验收数量",
+    span: 6
   },
 
   {
     prop: "error_num",
     label: "异常数量",
+    span: 6
   },
   {
     prop: "sale_price",
     label: "商品单价",
+    span: 6
   },
   {
     prop: "total_price",
     label: "出库单总价",
+    span: 6
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 6
   },
   {
     prop: "contactor",
     label: "收货联系人",
+    span: 6
   },
   {
     prop: "mobile",
     label: "收货联系人电话",
+    span: 6
   },
   {
     prop: "addr",
@@ -96,15 +114,9 @@ export default [
   //   label: "商品单价",
   // },
 
+
+ 
  
-  {
-    prop: "updatetime",
-    label: "更新时间",
-  },
-  {
-    prop: "addtime",
-    label: "创建时间",
-  },
 
 
 ]

+ 1 - 1
src/views/sellOut/sellOutOrder/components/addEditA.vue

@@ -4,7 +4,7 @@
     :center="true"
     align="left"
     top="14vh"
-    width="1000px"
+    width="900px"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"
     element-loading-text="拼命加载中"

+ 195 - 167
src/views/sellOut/sellOutOrder/components/addEditFormA.vue

@@ -4,96 +4,114 @@
     :loading="loading"
     :model="ruleForm"
     status-icon
+    :size="'small'"
     :rules="rulesThis"
     label-width="80px"
     style="width: 100%"
     class="demo-ruleForm"
   >
-    <!-- <p>orderCode{{ sitem }}</p> -->
-
     <el-row>
-      <el-row>
-        <el-col :span="8">
-          <el-form-item label="发货总量" prop="send_num" required>
-            <el-input
-              disabled
-              v-model="ruleForm.send_num"
-              placeholder="发货总量"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item label="异常数量" prop="anomalous_numbers">
-            <el-input
-              :disabled="disabled"
-              v-model="ruleForm.anomalous_numbers"
-              placeholder="异常数量"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="8">
-          <el-form-item label="期望意愿" prop="expect_wish">
-            <el-select
-              style="width: 100%"
-              :disabled="disabled"
-              v-model="ruleForm.expect_wish"
-              placeholder="期望意愿"
+      <el-col :span="6">
+        <el-form-item label="收货情况" prop="is_receive">
+          <el-select
+            style="width: 100%"
+            :disabled="disabled"
+            v-model="ruleForm.is_receive"
+            @change="is_receive_change"
+            placeholder="收货情况"
+          >
+            <el-option
+              v-for="item in is_receive_options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
             >
-              <el-option
-                v-for="item in expect_options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item label="异常原因" prop="anomalous_reason">
-            <el-select
-              style="width: 100%"
-              :disabled="disabled"
-              v-model="ruleForm.anomalous_reason"
-              placeholder="异常原因"
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="发货总量" prop="send_num" required>
+          <el-input
+            disabled
+            v-model="ruleForm.send_num"
+            placeholder="发货总量"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="异常数量" prop="num">
+          <digital-input
+            :values="ruleForm.num"
+            :placeholder="'异常数量'"
+            :min="0"
+            :disabled="ruleForm.is_receive === '0'"
+            :max="ruleForm.send_num"
+            :position="'right'"
+            :precision="0"
+            :size="'small'"
+            :controls="false"
+            :append="''"
+            @reschange="number_change($event, 'num')"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="9">
+        <el-form-item label="异常原因" prop="errorCode">
+          <el-select
+            style="width: 100%"
+            :disabled="ruleForm.is_receive === ''"
+            v-model="ruleForm.errorCode"
+            placeholder="异常原因"
+          >
+            <el-option
+              v-for="item in reason_options"
+              :key="item.id"
+              :label="item.result"
+              :value="item.result_code"
+              :disabled="item.status == 0"
             >
-              <el-option
-                v-for="item in reason_options"
-                :key="item.id"
-                :label="item.result"
-                :value="item.result_code"
-                :disabled="item.status == 0"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="16">
-          <el-form-item label="异常备注" prop="anomalous_remark">
-            <el-input
-              type="textarea"
-              placeholder="请输入异常原因备注"
-              v-model="ruleForm.anomalous_remark"
-              :disabled="disabled"
-              maxlength="250"
-              show-word-limit
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-col :span="24">
-        <el-form-item label="异常图片" prop="anomalous_images">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="9">
+        <el-form-item label="期望意愿" prop="except_code">
+          <el-select
+            style="width: 100%"
+            :disabled="ruleForm.is_receive === ''"
+            v-model="ruleForm.except_code"
+            placeholder="期望意愿"
+          >
+            <el-option
+              v-for="item in expect_options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="18">
+        <el-form-item label="异常备注" prop="remark">
+          <el-input
+            placeholder="异常备注"
+            v-model="ruleForm.remark"
+            type="textarea"
+            :rows="3"
+            :disabled="disabled"
+            maxlength="250"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="20">
+        <el-form-item label="异常图片" prop="img">
           <div class="el-form-item-error-img">
             <ul>
               <li
                 class="images_li"
                 :style="getMargin_li()"
-                v-for="(item, index) in ruleForm.anomalous_images"
+                v-for="(item, index) in ruleForm.img"
                 :key="item"
               >
-                <img :src="item" alt="" style="width: 254px; height: 164px" />
+                <img :src="item" alt="" style="width: 50px; height: 50px" />
                 <i
                   class="el-icon-close"
                   v-if="
@@ -107,7 +125,7 @@
             <div
               class="btnupload"
               :style="getMargin()"
-              v-if="ruleForm.anomalous_images.length < 5 && isShow"
+              v-if="ruleForm.img.length < 5 && isShow"
               style="position: relative"
               @click="show = true"
             >
@@ -125,7 +143,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col :span="24" style="text-align: right">
+      <el-col :span="4" style="text-align: right">
         <el-button
           type="primary"
           @click="submitForm"
@@ -165,44 +183,62 @@ export default {
       disabled: true,
       status: "", //存储详情接口返的状态
       showModelThis: this.showModel,
+      is_receive_options: [
+        {
+          value: "1",
+          label: "已收到货",
+        },
+        {
+          value: "0",
+          label: "未收到货",
+        },
+      ],
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
+        is_receive: "",
         send_num: "",
         order_type: "1", //售后类型 1销售2咨询,
         outCode: "", //
         stock_out_numbers: "", //出库单编号
-        anomalous_numbers: "", //异常数量
-        anomalous_reason: "", //异常原因
-        expect_wish: "", //期望意愿
-        anomalous_images: [],
-        anomalous_remark: "", //异常备注
+        num: "", //异常数量
+        errorCode: "", //异常原因
+        except_code: "", //期望意愿
+        img: [],
+        remark: "", //异常备注
       },
       rulesThis: this.rules,
       // 验证规则
       rules: {
-        anomalous_numbers: [
+        is_receive: [
+          {
+            required: true,
+            message: "请选择收货情况",
+            trigger: "change",
+          },
+        ],
+        num: [
           {
             required: true,
             trigger: "blur",
             validator: validatenumbers,
           },
         ],
-        anomalous_reason: [
+        errorCode: [
           {
             required: true,
             message: "请选择异常原因",
             trigger: "change",
           },
         ],
-        expect_wish: [
+        except_code: [
           {
             required: true,
             message: "请选择期望意愿",
             trigger: "change",
           },
         ],
-        anomalous_images: [
+        img: [
           {
             type: "array",
             required: true,
@@ -210,17 +246,17 @@ export default {
             trigger: "change",
           },
         ],
-        anomalous_remark: [
+        remark: [
           {
             required: true,
-            message: "请输入异常原因备注",
+            message: "请输入异常备注",
             trigger: "blur",
           },
         ],
       },
       reason_options: [],
-      reason_value: "", //异常原因
-      expect_options: [
+      expect_options: [],
+      expect_options1: [
         {
           value: "1",
           label: "退货",
@@ -229,9 +265,15 @@ export default {
           value: "2",
           label: "换货",
         },
+      ],
+      expect_options0: [
         {
-          value: "3",
-          label: "改变售价",
+          value: "1",
+          label: "退货",
+        },
+        {
+          value: "2",
+          label: "补发",
         },
       ],
       expect_value: "", //期望意愿
@@ -252,7 +294,6 @@ export default {
     },
   },
   mounted() {
-    this.getReason(); //获取异常原因
     this.initForm();
   },
   watch: {
@@ -268,11 +309,6 @@ export default {
     },
   },
   methods: {
-    //   关闭弹窗,直接隐藏表单
-    // async closeAddEdit() {
-    //   this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
-    //
-    // },
     closeAdd() {
       this.showModelThis = false;
     },
@@ -296,11 +332,11 @@ export default {
             console.log(res.data);
           this.ruleForm = {
             stock_out_numbers: "", //出库单编号
-            anomalous_numbers: error_num, //异常数量
-            anomalous_reason: error_code, //异常原因
-            expect_wish: except_code, //期望意愿
-            anomalous_images: [error_img],
-            anomalous_remark: error_remark, //异常备注
+            num: error_num, //异常数量
+            errorCode: error_code, //异常原因
+            except_code: except_code, //期望意愿
+            img: [error_img],
+            remark: error_remark, //异常备注
           };
         } else if (res && res.code >= 100 && res.code <= 104) {
           await this.logout();
@@ -310,6 +346,25 @@ export default {
       }
     },
 
+    async is_receive_change() {
+      const { is_receive } = this.ruleForm;
+      this.ruleForm.errorCode = "";
+      this.ruleForm.except_code = "";
+      this.expect_options = [];
+      this.reason_options = [];
+      if (is_receive !== "") {
+        this.expect_options = JSON.parse(
+          JSON.stringify(
+            is_receive === "1" ? this.expect_options1 : this.expect_options0
+          )
+        );
+        await this.getReason(is_receive === "1" ? "3" : "6"); //获取异常原因
+      }
+    },
+    async number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
+    },
     async resetForm() {
       this.resign_name = "";
       this.hand_name = "";
@@ -321,53 +376,35 @@ export default {
           this.$refs.ruleForm.clearValidate();
           let { send_num } = this.sitem;
           this.ruleForm = {
+            is_receive: "",
             send_num: send_num || "",
-            anomalous_numbers: "", //异常数量
-            anomalous_reason: "", //异常原因
-            expect_wish: "", //期望意愿
-            anomalous_images: [],
+            num: send_num || "", //异常数量
+            errorCode: "", //异常原因
+            except_code: "", //期望意愿
+            img: [],
             outCode: this.code,
           };
-          // }
         }
       });
     },
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          const { anomalous_numbers } = this.ruleForm;
-          if (this.sitem.send_num < anomalous_numbers) {
-            this.$message.warning("异常数量不能大于发货数量");
-            return false;
-          }
           let model = JSON.parse(JSON.stringify(this.ruleForm));
-          console.log(model);
-          // console.log("调接口");
-          let _model = {
-            order_type: "1",
-            outCode: this.sitem.outCode,
-            orderCode: this.sitem.orderCode,
-
-            errorCode: model.anomalous_reason, //异常原因
-            num: model.anomalous_numbers,
-            remark: model.anomalous_remark,
-            except_code: model.expect_wish,
-            img: model.anomalous_images.toString(),
-          };
-
-          const res = await asyncRequest.add(_model);
-
-          if (res && res.code === 0) {
+          model.outCode = this.sitem.outCode;
+          model.img = model.img.toString();
+          const { code, data, message } = await asyncRequest.add(model);
+          if (code === 0) {
             const title = this.id === "add" ? "添加成功!" : "修改成功!";
             this.$notify.success({
               title,
               message: "",
             });
             this.$emit("refresh", false);
-          } else if (res && res.code >= 100 && res.code <= 104) {
+          } else if (code >= 100 && code <= 104) {
             await this.logout();
           } else {
-            this.$message.warning(res.message);
+            this.$message.warning(message);
           }
         } else {
           console.log("error submit!!");
@@ -377,9 +414,9 @@ export default {
     },
 
     // 获取异常原因
-    async getReason() {
+    async getReason(type) {
       let model = {
-        type: "2",
+        type: type,
         page: 1,
         size: 100,
       };
@@ -393,20 +430,11 @@ export default {
         this.$message.warning(res.message);
       }
     },
-    // 异常原因
-    handleAnomalousReason(e) {
-      if (e) {
-        this.ruleForm.anomalous_reason = e;
-      } else {
-        this.ruleForm.anomalous_reason = "";
-      }
-      this.$refs.ruleForm.validateField("company_img");
-    },
     //图片上传失败
     UploadErrorEvent(res) {
       if (res !== "break") {
         this.$message.error("图片上传失败!");
-        this.$refs.ruleForm.validateField("anomalous_images");
+        this.$refs.ruleForm.validateField("img");
       }
     },
 
@@ -416,9 +444,9 @@ export default {
       if (url === "noToken") {
         await this.logout();
       } else {
-        this.ruleForm.anomalous_images.push(url);
+        this.ruleForm.img.push(url);
         this.$message.success("图片上传成功!");
-        this.$refs.ruleForm.validateField("anomalous_images");
+        this.$refs.ruleForm.validateField("img");
       }
     },
     //判断图片规格
@@ -445,20 +473,20 @@ export default {
       return isJPG && isLt2M;
     },
     imgClose(index) {
-      this.ruleForm.anomalous_images.splice(index, 1);
-      this.$refs.ruleForm.validateField("anomalous_images");
+      this.ruleForm.img.splice(index, 1);
+      this.$refs.ruleForm.validateField("img");
     },
     getMargin() {
-      if (this.ruleForm.anomalous_images.length == 0) {
+      if (this.ruleForm.img.length == 0) {
         return "margin:0;";
-      } else if (this.ruleForm.anomalous_images.length < 3) {
+      } else if (this.ruleForm.img.length < 3) {
         return "margin:0px 0 0 10px";
       } else {
         return "margin:10px 0 0 10px";
       }
     },
     getMargin_li() {
-      if (this.ruleForm.anomalous_images.length <= 3) {
+      if (this.ruleForm.img.length <= 3) {
         return "margin:0 0 0 10px";
       } else {
         return "margin:10px 0 0 10px";
@@ -478,9 +506,9 @@ export default {
       border: 1px solid rgb(220, 223, 230);
       // border-left: 0;
       box-sizing: border-box;
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
+      width: 50px;
+      height: 50px;
+      line-height: 50px;
       position: relative;
       img {
         display: inline-block;
@@ -492,11 +520,11 @@ export default {
         top: 0;
         right: 0;
         z-index: 2;
-        width: 25px;
-        height: 25px;
+        width: 16px;
+        height: 16px;
         text-align: center;
-        line-height: 25px;
-        font-size: 19px;
+        line-height: 16px;
+        font-size: 13px;
         &:hover {
           color: #63cbe7;
         }
@@ -505,8 +533,8 @@ export default {
   }
 }
 .images_li {
-  // width: 254px;
-  // height: 164px;
+  // width: 50px;
+  // height: 50px;
   float: left;
 }
 .btnupload {
@@ -514,22 +542,22 @@ export default {
   border: 1px solid rgb(220, 223, 230);
   // border-left: 0;
   box-sizing: border-box;
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
+  width: 50px;
+  height: 50px;
+  line-height: 50px;
   text-align: center;
 }
 .Upload {
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
+  width: 50px;
+  height: 50px;
+  line-height: 50px;
   text-align: center;
   position: absolute;
   line-height: 0px;
   top: 0;
   left: 0;
   z-index: 2;
-  line-height: 164px;
+  line-height: 50px;
 }
 .avatar-uploader-icon {
   font-size: 33px;

+ 0 - 203
src/views/sellOut/sellOutOrder/components/sellReturnApply.vue

@@ -1,203 +0,0 @@
-<template>
-  <div class="outOrderTable">
-    <out-order-add-model
-      :showModel="modelShowModel"
-      :id="modelId"
-      :sitem="modelItem"
-      @refresh="refresh"
-    />
-    <div class="tr" style="padding: 0 20px 20px 0">
-      <el-button
-        type="primary"
-        plain
-        :size="'mini'"
-        @click="openModal('add', '')"
-        >新建售后申请单</el-button
-      >
-    </div>
-    <add-edit
-      :id="modelId"
-      :sitem="s_sitem"
-      :show-model="showModel"
-      :is-detail="isDetail"
-      @refresh="refresh"
-      @cancel="showModel = false"
-    />
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
-// import outOrderAddModel from "./out-order-add-model";
-import addEdit from "./addEdit_sellReturnOrder.vue";
-
-import { mapGetters } from "vuex";
-
-export default {
-  name: "salesOrderDetail",
-  mixins: [mixinPage, resToken],
-  props: ["newTime", "id", "sitem"],
-  components: { addEdit }, //outOrderAddModel
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "salesOrderDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-
-  data() {
-    return {
-      orderCode: "",
-      outCode: "",
-      // 状态
-      statusOptions: [
-        { id: "1", label: "已出库" },
-        { id: "2", label: "验收中" },
-        { id: "3", label: "验收完成" },
-      ],
-      showGoodsModel: false,
-      stock_code: "",
-      tableData: [],
-      loading: false,
-      queryId: "",
-      status: "",
-      showModel: null,
-      modelId: "",
-      modelItem: null,
-      s_sitem: null,
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    refresh(e) {
-      console.log(e);
-      this.$emit("refresh", e);
-    },
-    initForm() {
-      this.status = "";
-      this.queryId = this.$route.query.id;
-      //   this.resetForm();
-    },
-    getNewTime() {
-      this.newTime = new Date().valueOf();
-    },
-    // async resetForm() {
-    //   // 重置
-    //   await this.$nextTick(() => {
-
-    //   });
-    // },
-
-    editRow(index) {
-      let findex = this.stockForm.good_stock.findIndex((v) => v.edit === true);
-      if (findex !== -1) {
-        this.$message.warning("当前已有发货仓库信息在编辑,请保存后再试!");
-        return;
-      } else {
-        this.stockForm.good_stock[index].edit = true;
-      }
-    },
-    checkStockRow(index) {
-      let total = parseInt(this.stockForm.good_stock[index].usable_stock),
-        num = parseInt(this.stockForm.good_stock[index].num);
-      if (total === 0) {
-        this.$message.warning("该仓库已无该商品库存!不能销售!");
-        return;
-      } else {
-        if (num > total) {
-          this.$message.warning("销售数量不能大于可用库存!");
-          return;
-        } else {
-          this.stockForm.good_stock[index].edit = false;
-        }
-      }
-    },
-
-    openHouseModal() {
-      this.modelId = "add";
-      this.modelItem = this.sitem;
-      this.modelShowModel = true;
-    },
-
-    //省市区保存某一行
-    checkRow(rowIndex) {
-      this.$refs.addrForm.validate((valid) => {
-        if (valid) {
-          this.tableData[rowIndex].edit = false;
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    // 省市区删除行操作
-    deleteRow(index, rows) {
-      rows.splice(index, 1);
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
-          let model = {
-            id: this.queryId,
-            order_addr: [],
-          };
-          order_addr.forEach((v2) => {
-            let model2 = {
-              post_fee: v2.post_fee,
-              id: v2.id,
-            };
-            model.order_addr.push(model2);
-          });
-          let res = await asyncRequest.salefee(model);
-          this.loading = false;
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "反馈物流费用成功!",
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    openModal(code, sitem, outcode) {
-      this.s_sitem = this.sitem;
-      this.modelId = code;
-      this.showModel = true;
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-</style>
-   

+ 210 - 0
src/views/sellOut/sellOutOrder/components/want-deliver.vue

@@ -0,0 +1,210 @@
+<template>
+  <el-form
+    v-loading="loading"
+    :model="ruleForm"
+    :rules="rules"
+    status-icon
+    ref="ruleForm"
+    label-width="90px"
+    class="demo-ruleForm"
+  >
+    <el-row>
+      <el-col :span="8">
+        <el-form-item label="发货总数" prop="send_num" required>
+          <el-input
+            disabled
+            placeholder="物流单号"
+            v-model="ruleForm.send_num"
+            maxlength="100"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="8">
+        <el-form-item label="物流公司" prop="post_name">
+          <search-express
+            :value="ruleForm.post_name"
+            :placeholder="'物流公司'"
+            :names="''"
+            :is-detail="false"
+            @searchChange="handleCompany"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="8">
+        <el-form-item label="物流单号" prop="post_code">
+          <el-input
+            placeholder="物流单号"
+            v-model="ruleForm.post_code"
+            maxlength="100"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="8">
+        <el-form-item label="物流费用" prop="post_fee">
+          <el-input
+            placeholder="物流费用"
+            v-model="ruleForm.post_fee"
+            maxlength="100"
+          >
+            <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
+      </el-col>
+
+      <el-col
+        :span="16"
+        style="text-align: right"
+      >
+        <el-button type="primary" :size="'mini'"  @click="submitForm">保 存 </el-button>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
+import resToken from "@/mixins/resToken";
+import { isnumber, isnumber2, isAlphanumeric } from "@/utils/validate";
+export default {
+  name: "wsmInOrderAdd",
+  props: ["id", "sitem", "newTime"],
+  mixins: [resToken],
+  data() {
+    const validatePrice = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (isnumber(value)) {
+          callback();
+        } else if (isnumber2(value)) {
+          callback();
+        } else {
+          callback(new Error("仅支持整数或两位小数!"));
+        }
+      }
+    };
+    const validateCode = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isAlphanumeric(value)) {
+          callback(new Error("仅支持字母和数字!"));
+        } else {
+          callback();
+        }
+      }
+    };
+
+    return {
+      loading: true,
+      ruleForm: {
+        outCode: "",
+        send_num: "",
+        post_name: [],
+        post_code: "",
+        post_fee: "",
+        // sendtime: "",
+      },
+      rules: {
+        post_name: {
+          type: "array",
+          required: true,
+          trigger: "change",
+          message: "请输入物流公司",
+        },
+        post_code: {
+          required: true,
+          validator: validateCode,
+          trigger: "blur",
+        },
+        post_fee: {
+          required: true,
+          validator: validatePrice,
+          trigger: "blur",
+        },
+      },
+    };
+  },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    
+
+    async initForm() {
+      this.loading = true;
+      await this.resetForm();
+      this.loading = false;
+    },
+
+    //初始化表单
+    async resetForm() {
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+
+          const { outCode, send_num, post_code, post_name, post_fee } =
+            this.sitem;
+          this.ruleForm = {
+            outCode: outCode || "",
+            send_num: send_num || "",
+            post_name: post_name ? [post_name] : [],
+            post_code: post_code || "",
+            post_fee: post_fee || "",
+            // sendtime: "",
+          };
+        }
+      });
+    },
+    // 保存更改
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+          model.post_name = model.post_name.toString();
+          delete model["send_num"];
+          delete model["page"];
+          const res = await asyncRequest.saleoutsend(model);
+          this.loading = false;
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "添加成功",
+              message: "",
+            });
+            this.$emit("refresh"); //抛出事件给详情页。
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    handleCompany(e) {
+      console.log(e);
+      if (e && e.code) {
+        this.ruleForm.post_name = [e.shortName];
+        this.ruleForm.page = 1;
+      }
+      console.log(this.ruleForm.express_company);
+      this.$refs.ruleForm.validateField("post_name");
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 10 - 20
src/views/sellOut/sellOutOrder/detail.vue

@@ -55,27 +55,18 @@
                   }}</el-tag>
                 </template>
               </show-data-table>
-
-              <!-- <add-edit-form
-            :sitem="sitem"
-            :newTime="newTime"
-            v-if="newTime != ''"
-          ></add-edit-form> -->
             </el-collapse-item>
             <el-collapse-item
-              title="客户验收"
+              title="库管发货"
               name="3"
-              v-if="status === '1' && powers.some((item) => item == '052')"
+              v-if="status === '0' && powers.some((item) => item == '080')"
             >
-              <div class="tr" style="padding: 0 0 20px 0">
-                <el-button
-                  type="primary"
-                  plain
-                  :size="'mini'"
-                  @click="goodsCheck"
-                  >客户已收到货</el-button
-                >
-              </div>
+              <want-deliver
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :sitem="sitem"
+                @refresh="initData"
+              />
             </el-collapse-item>
             <!-- <el-collapse-item title="填写售后申请单" name="3" v-if="status === '4'">
           <sell-return-apply
@@ -119,15 +110,14 @@ import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
 import addEditForm from "./components/addEditForm.vue"; //出库单详情
 import addEditA from "./components/addEditA";
 import ShowDataTableColumns from "./ShowDataTableColumns";
-import SellReturnApply from "./components/sellReturnApply.vue";
-
+import wantDeliver from "./components/want-deliver.vue";
 export default {
   name: "sellOutOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
     addEditForm,
     addEditA,
-    SellReturnApply,
+    wantDeliver,
   },
   computed: {
     powers() {

+ 5 - 4
src/views/serviceParam/unusualReason/addEdit.vue

@@ -96,11 +96,12 @@ export default {
       options: [
         { id: "1", label: "入库验收异常" },
         { id: "2", label: "退货验收异常" },
-        { id: "3", label: "售后退换货" },
+        { id: "3", label: "售后已收到货异常" },
         { id: "4", label: "采购退货" },
         { id: "5", label: "销售退换货" },
+        { id: "6", label: "售后未收到货异常" },
       ],
-      
+
       rules: {
         type: [
           {
@@ -193,13 +194,13 @@ export default {
         console.log(valid);
         if (valid) {
           this.loading = true;
-          const { result, result_desc,type } = JSON.parse(
+          const { result, result_desc, type } = JSON.parse(
             JSON.stringify(this.ruleForm)
           );
           const model = {
             result: result || "", //入库验收异常原因
             result_desc: result_desc || "", //入库异常备注
-            type: type||'1',
+            type: type || "1",
             id: this.id,
           };
           let res = {};

+ 2 - 1
src/views/serviceParam/unusualReason/index.vue

@@ -217,9 +217,10 @@ export default {
       options: [
         { id: "1", label: "入库验收异常" },
         { id: "2", label: "退货验收异常" },
-        { id: "3", label: "售后退换货" },
+        { id: "3", label: "售后已收到货异常" },
         { id: "4", label: "采购退货" },
         { id: "5", label: "销售退换货" },
+        { id: "6", label: "售后未收到货异常" },
       ],
       statusList: statusList,
       loading: true,