戴艳蓉 3 years ago
parent
commit
1d68bd14d3

+ 2 - 2
src/apis/service/sellOut/salesOrder/detail.js

@@ -16,12 +16,12 @@ export default {
   getGoodStock: (data, params) => http(api + "checkflist", data, "post", params),
   // 采购反馈物流费用
   salefee: (data, params) => http(api + "salefee", data, "post", params),
+  // 新建销售出库单
+  saleout: (data, params) => http(api + "saleout", data, "post", params),
 
 
 
 
-  // 新建入库单
-  orderinadd: (data, params) => http(api + "orderinadd", data, "post", params),
   // 新建入库单详情
   orderininfo: (data, params) => http(api + "orderininfo", data, "post", params),
   // 异常原因列表

+ 1 - 0
src/assets/js/btnList.js

@@ -31,6 +31,7 @@ const btnList = [
   { code: "030", name: "备货入库验收审核" },
   { code: "031", name: "入库审核" },
   { code: "032", name: "退货物流" },
+  { code: "033", name: "采购反馈物流费" },
   
 ];
 export default btnList;

+ 1 - 1
src/utils/validate.js

@@ -192,7 +192,7 @@ export function isnumber(s) {
  * @param {*} s
  */
  export function isnumber2(s) {
-  return /^[1-9][0-9]*([\.][0-9]{1,2})?$/.test(s)
+  return /^(([0-9])|([1-9]([0-9]+)))(.[0-9]+)?$/.test(s)
 }
 /**
  * 数字字母

+ 1 - 3
src/views/purchaseIn/purchaseOrder/components/rules.js

@@ -7,9 +7,7 @@ const validatePrice = (rule, value, callback) => {
     if (value === "") {
         callback(new Error("不能为空!"));
     } else {
-        if (isnumber(value)) {
-            callback();
-        } else if (isnumber2(value)) {
+        if (isnumber2(value)) {
             callback();
         } else {
             callback(new Error("仅支持整数或两位小数!"))

+ 1 - 3
src/views/purchaseIn/purchaseOrder/components/wsm-in-order-addEdit-form.vue

@@ -142,9 +142,7 @@ export default {
       if (value === "") {
         callback(new Error("不能为空!"));
       } else {
-        if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
+         if (isnumber2(value)) {
           callback();
         } else {
           callback(new Error("仅支持整数或两位小数!"));

+ 1 - 3
src/views/purchaseIn/storeManage/components/rules.js

@@ -7,9 +7,7 @@ const validatePrice = (rule, value, callback) => {
     if (value === "") {
         callback(new Error("不能为空"));
     } else {
-        if (isnumber(value)) {
-            callback();
-        } else if (isnumber2(value)) {
+         if (isnumber2(value)) {
             callback();
         } else {
             callback(new Error("仅支持整数或两位小数!"))

+ 10 - 12
src/views/sellOut/salesOrder/components/addForm.vue

@@ -15,6 +15,7 @@
               <el-form-item label="商品名称" prop="good_code">
                 <el-input
                   v-model="ruleForm.good_name"
+                  disabled
                   readonly
                   @focus="showGoodsModel = true"
                 />
@@ -25,6 +26,7 @@
                 <search-customer
                   :value="ruleForm.customer_code"
                   :names="companyName"
+                  :disabled="!(status === '0' && powers.some((item) => item == '005'))"
                   :is-detail="true"
                   @searchChange="customer_code_change"
                 />
@@ -54,21 +56,21 @@
             <el-table-column
               prop="wsm_supplierNo"
               label="发货公司编号"
-              width="145"
+              width="142"
             />
 
             <el-table-column
               show-overflow-tooltip
               prop="wsm_supplier"
               label="发货公司名称"
-              min-width="145"
+              min-width="165"
             />
-            <el-table-column prop="wsm_code" label="发货仓库编码" width="180" />
+            <el-table-column prop="wsm_code" label="发货仓库编码" width="170" />
             <el-table-column
               show-overflow-tooltip
               prop="wsm_name"
               label="发货仓库名称"
-              min-width="180"
+              min-width="100"
             />
             <el-table-column
               prop="usable_stock"
@@ -526,13 +528,8 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          const {
-            good_code,
-            good_name,
-            customer_code,
-            companyName,
-            status,
-          } = this.sitem;
+          const { good_code, good_name, customer_code, companyName, status } =
+            this.sitem;
           this.companyName = companyName;
           this.status = status;
           this.ruleForm = {
@@ -579,13 +576,14 @@ export default {
 
           if (addrs && addrs.length > 0) {
             addrs.forEach((v) => {
+              const { area_code, city_code, provice_code } = v.addr_code;
               let model = {
                 edit: false,
                 arrive_time: v.arrive_time || "",
                 receipt_quantity: v.receipt_quantity || "",
                 contactor: v.contactor || "",
                 mobile: v.mobile || "",
-                addr_code: v.addr_code ? v.addr_code : [],
+                addr_code: area_code&&city_code&&provice_code?[provice_code,city_code,area_code] : [],
                 addr: v.addr || "",
                 id: v.id,
                 is_del: 0,

+ 27 - 63
src/views/sellOut/salesOrder/components/feedbackForm.vue

@@ -11,45 +11,44 @@
             row-key="key"
           >
             <el-table-column
-             show-overflow-tooltip
+              show-overflow-tooltip
               prop="receipt_quantity"
               label="收货总数"
               width="110"
             />
 
             <el-table-column
-             show-overflow-tooltip
+              show-overflow-tooltip
               prop="arrive_time"
               label="最晚收货日期"
               width="145"
             />
             <el-table-column
-             show-overflow-tooltip
+              show-overflow-tooltip
               prop="contactor"
               label="收件联系人"
               width="85"
             />
 
             <el-table-column
-             show-overflow-tooltip
+              show-overflow-tooltip
               prop="mobile"
               label="收货联系电话"
               width="110"
             />
+
             <el-table-column
-             show-overflow-tooltip
-              prop="addr_code"
-              label="收货省市区"
-              min-width="230"
-            />
-            <el-table-column
-             show-overflow-tooltip
+              show-overflow-tooltip
               prop="addr"
-              label="详细地址"
-              min-width="170"
+              label="收货地址"
+              min-width="200"
             />
 
-            <el-table-column prop="post_fee" label="预计物流费用" min-width="170">
+            <el-table-column
+              prop="post_fee"
+              label="预计物流费用"
+              min-width="170"
+            >
               <template slot-scope="scope">
                 <el-form-item
                   :prop="'order_addr.' + scope.$index + '.' + 'post_fee'"
@@ -64,13 +63,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-
-            <el-table-column
-              fixed="right"
-              width="80"
-              label="操作"
-              v-if="status === '0' && powers.some((item) => item == '005')"
-            >
+            <el-table-column fixed="right" width="80" label="操作" v-if="status === '1' && powers.some((item) => item == '033')">
               <template slot-scope="scope">
                 <el-tooltip
                   effect="dark"
@@ -100,7 +93,7 @@
           </el-table>
         </el-form>
       </el-col>
-      <el-col :span="24" style="text-align: right">
+      <el-col :span="24" style="text-align: right" v-if="status === '1' && powers.some((item) => item == '033')">
         <el-button :size="'mini'" type="primary" @click="submitForm"
           >保 存
         </el-button>
@@ -113,7 +106,7 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import searchStockGoodModal from "@/components/search-stock-good-modal";
-import { isnumber } from "@/utils/validate";
+import { isnumber2 } from "@/utils/validate";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
@@ -143,15 +136,16 @@ export default {
   data() {
     const validateWeight = (rule, value, callback) => {
       if (value === "") {
-        callback(new Error("收货总数不能为空!"));
+        callback(new Error("物流费用不能为空"));
       } else {
-        if (!isnumber(value)) {
-          callback(new Error("收货总数仅支持整数!"));
+        if (!isnumber2(value)) {
+          callback(new Error("物流费用仅支持整数或两位小数!"));
         } else {
           callback();
         }
       }
     };
+
     return {
       showGoodsModel: false,
       stock_code: "",
@@ -190,22 +184,22 @@ export default {
         if (this.$refs.addrForm) {
           this.$refs.addrForm.resetFields();
           this.$refs.addrForm.clearValidate();
-          const { item } = this.sitem;
+          const { addrs } = this.sitem;
           this.addrForm = {
             order_addr: [],
           };
-          if (item && item.length > 0) {
-            item.forEach((v) => {
+          if (addrs && addrs.length > 0) {
+            addrs.forEach((v) => {
               let model = {
                 edit: false,
                 arrive_time: v.arrive_time || "",
                 receipt_quantity: v.receipt_quantity || "",
                 contactor: v.contactor || "",
                 mobile: v.mobile || "",
-                addr_code: v.addr_code ? v.addr_code : [],
-                addr: v.addr || "",
+                addr: v.addr_info + v.addr || "",
                 id: v.id,
-                post_fee:v.post_fee||"0"
+                post_fee: v.post_fee || "",
+                is_del: 0,
               };
               this.addrForm.order_addr.push(model);
             });
@@ -214,31 +208,6 @@ export default {
       });
     },
 
-    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(index) {
       let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
       if (findex !== -1) {
@@ -255,17 +224,12 @@ export default {
         if (valid) {
           this.addrForm.order_addr[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) => {
+      await this.$refs.addrForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
           const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));

+ 179 - 94
src/views/sellOut/salesOrder/components/out-order-add-model.vue

@@ -4,7 +4,7 @@
     :title="title"
     :center="true"
     align="left"
-    top="10vh"
+    top="8vh"
     width="900px"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"
@@ -29,13 +29,17 @@
             @selection-change="handleSelectionChange($event, 0)"
           >
             <el-table-column type="selection" width="40" align="center" />
-            <el-table-column prop="name" label="日期" width="120" />
-            <el-table-column prop="name" label="姓名" width="120" />
             <el-table-column
-              prop="address"
-              label="地址"
+              prop="wsm_supplier"
+              label="发货仓库"
               show-overflow-tooltip
-            />
+            >
+              <template slot-scope="scope">
+                {{ scope.row.wsm_supplier }}/{{ scope.row.wsm_name }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="num" label="下单数量" width="150" />
+            <el-table-column prop="original_price" label="销售价" width="110" />
           </el-table>
         </el-col>
         <el-col :span="24">
@@ -52,61 +56,150 @@
             @selection-change="handleSelectionChange($event, 1)"
           >
             <el-table-column type="selection" width="40" align="center" />
-            <el-table-column prop="name" label="日期" width="120" />
-            <el-table-column prop="name" label="姓名" width="120" />
             <el-table-column
-              prop="address"
-              label="地址"
-              show-overflow-tooltip
+              prop="receipt_quantity"
+              label="总数量"
+              width="100"
             />
+            <el-table-column prop="arrive_time" label="最晚到货时间" />
+            <el-table-column prop="contactor" label="收件人" width="60" />
+            <el-table-column prop="mobile" label="联系电话" width="105" />
+            <el-table-column
+              prop="contactor"
+              label="收件地址"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.addr_info }}{{ scope.row.addr }}
+              </template>
+            </el-table-column>
+            <!-- <el-table-column prop="post_fee" label="物流费" width="100" /> -->
           </el-table>
         </el-col>
-        <!-- <el-col :span="5" style="text-align: right">
-          <el-button type="primary" @click="submitForm">保 存 </el-button>
-          <el-button @click="showModelThis = false">关 闭</el-button>
-        </el-col> -->
+        <el-form
+          ref="ruleForm"
+          :model="ruleForm"
+          status-icon
+          :rules="rulesThis"
+          label-width="90px"
+          class="demo-ruleForm"
+        >
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="发货数量" prop="send_num">
+                <el-input v-model="ruleForm.send_num" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流费用" prop="post_fee">
+                <el-input v-model="ruleForm.post_fee" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流公司" prop="post_name">
+                <el-input v-model="ruleForm.post_name" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流单号" prop="post_code">
+                <el-input v-model="ruleForm.post_code" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-col :span="24" style="text-align: right">
+            <el-button type="primary" @click="submitForm">保 存 </el-button>
+            <el-button @click="showModelThis = false">关 闭</el-button>
+          </el-col>
+        </el-form>
       </el-row>
     </el-card>
   </el-dialog>
 </template>
 <script>
-import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
+import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import resToken from "@/mixins/resToken";
+import { isnumber, isnumber2, isAlphanumeric } from "@/utils/validate";
 export default {
   name: "Account",
   props: ["showModel", "id", "sitem"],
   mixins: [resToken],
   data() {
+    const validatePrice = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (isnumber2(value)) {
+          callback();
+        } else {
+          callback(new Error("仅支持整数或两位小数!"));
+        }
+      }
+    };
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validateCode = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isAlphanumeric(value)) {
+          callback(new Error("仅支持字母和数字!"));
+        } else {
+          callback();
+        }
+      }
+    };
     return {
       roleList: [],
       tableData: [],
       tableData1: [],
       loading: false,
       title: "新建销售出库单",
-      organizeList: [],
+      list1: [],
+      list0: [],
       showModelThis: this.showModel,
       rulesThis: {},
+      rules: {
+        send_num: {
+          required: true,
+          validator: validateWeight,
+          trigger: "blur",
+        },
+        post_name: {
+          required: true,
+          trigger: "blur",
+          message: "请输入物流公司",
+        },
+        post_code: {
+          required: true,
+          validator: validateCode,
+          trigger: "blur",
+        },
+        post_fee: {
+          required: true,
+          validator: validatePrice,
+          trigger: "blur",
+        },
+      },
       supplierName: "",
       good_price: "0",
       lasttime: "",
       ruleForm: {
-        nake_fee: "", //裸价
-        wsm_code: "", //仓库
-        supplier_code: "", //供应商
-        supplierNo: [], //采购供应商编码
-        good_num: "",
-        expecttime: "",
-        weight: "",
-        now_god_price: "",
-        teach_fee: "",
-        pakge_fee: "",
-        mark_fee: "",
-        cert_fee: "",
-        delivery_fee: "",
-        open_fee: "",
-        diff_weight: "",
-        diff_fee: "",
-        remark: "",
+        post_name: "", //裸价
+        post_code: "", //仓库
+        post_fee: "", //供应商
+        send_num: "", //采购供应商编码
+        addrid: "",
+        orderCode: "",
+        wsm_code: "",
       },
     };
   },
@@ -129,74 +222,43 @@ export default {
     },
 
     handleSelectionChange(e, type) {
-      // console.log(e);
-      // console.log(type);
+      if (type === 0) {
+        this.list0 = e;
+        this.ruleForm.wsm_code = e && e.length > 0 ? e[0].wsm_code : "";
+      } else {
+        this.list1 = e;
+        this.ruleForm.addrid = e && e.length > 0 ? e[0].id : "";
+      }
+      console.log(type);
+      console.log(this.ruleForm.wsm_code, this.ruleForm.addrid);
+      console.log(this.ruleForm);
     },
     async initForm() {
       this.loading = true;
-      this.rulesThis = {};
+      this.list0 = [];
+      this.list1 = [];
+      this.rulesThis = this.rules;
       await this.resetForm();
       this.loading = false;
     },
-    // 选择供应商
-    selectSupplier(e) {
-      if (e && e.id) {
-        this.ruleForm.supplierNo = [e.code];
-      } else {
-        this.ruleForm.supplierNo = [];
-        this.ruleForm.stock_code = [];
-      }
-      this.$refs.ruleForm.validateField("supplierNo ");
-    },
+
     //初始化表单
     async resetForm() {
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          const {
-            good_price,
-            nake_fee,
-            wsm_code,
-            supplierNo,
-            weight,
-            now_god_price,
-            teach_fee,
-            pakge_fee,
-            mark_fee,
-            cert_fee,
-            delivery_fee,
-            open_fee,
-            diff_weight,
-            diff_fee,
-            remark,
-            good_num,
-            supplier_name,
-            lasttime,
-          } = this.sitem;
-          this.good_price = good_price || "0";
-          this.supplierName = supplier_name;
-          this.lasttime = lasttime || "";
+          const { addrs, info, orderCode } = this.sitem;
+          this.tableData = info;
+          this.tableData1 = addrs;
           this.ruleForm = {
-            cgdNo: this.id,
-            nake_fee: nake_fee || "0", //裸价
-            wsm_code: wsm_code || "", //仓库
-            cgder_id: "",
-            supplierNo: supplierNo ? [supplierNo] : [], //采购供应商
-            good_num: good_num || "0",
-            expecttime: lasttime || "", //预计入库时间
-            weight: weight ? parseInt(weight + "") + "" : "0", //贵金属重量
-            now_god_price: now_god_price || "10", //实时金价
-            teach_fee: teach_fee || "0", //工艺费
-            pakge_fee: pakge_fee || "0", //包装费
-            mark_fee: mark_fee || "0", //加标费
-            cert_fee: cert_fee || "0", //证书费
-            delivery_fee: delivery_fee || "0", //物流费
-            open_fee: open_fee || "0", //开模费
-            diff_weight: diff_weight ? parseInt(diff_weight + "") + "" : "0", //工差重量
-            diff_fee: diff_fee || "0", //工差金额
-            remark: remark,
-            good_price: "",
+            post_name: "顺丰",
+            post_code: "xxx2322",
+            post_fee: "20",
+            send_num: "10",
+            addrid: "",
+            orderCode: orderCode || "",
+            wsm_code: "",
           };
         }
       });
@@ -207,11 +269,34 @@ export default {
         if (valid) {
           this.loading = true;
           const item = JSON.parse(JSON.stringify(this.ruleForm));
-          item.supplierNo = item.supplierNo.toString();
-
-          console.log(item);
-
-          const res = await asyncRequest.update(item);
+          if (this.list0.length === 0) {
+            this.$message.warning("请选择发货仓库!");
+            return;
+          }
+          if (this.list1.length === 0) {
+            this.$message.warning("请选择收货地址!");
+            return;
+          }
+          if (this.list0.length !== 1) {
+            this.$message.warning("只能选择一个发货仓库!");
+            return;
+          }
+          if (this.list1.length !== 1) {
+            this.$message.warning("只能选择一个收货地址!");
+            return;
+          }
+          let cNum = parseInt(this.list0[0].num);
+          let aNum = parseInt(this.list1[0].send_num);
+          let num = parseInt(this.ruleForm.send_num);
+          if (num > cNum) {
+            this.$message.warning("发货数量不能大于仓库出货数量!");
+            return;
+          }
+          if (num > aNum) {
+            this.$message.warning("发货数量不能大于收货地址总数量!");
+            return;
+          }
+          const res = await asyncRequest.saleout(item);
           this.loading = false;
           if (res && res.code === 0) {
             this.$notify.success({

+ 1 - 3
src/views/sellOut/salesOrder/components/rules.js

@@ -7,9 +7,7 @@ const validatePrice = (rule, value, callback) => {
     if (value === "") {
         callback(new Error("不能为空!"));
     } else {
-        if (isnumber(value)) {
-            callback();
-        } else if (isnumber2(value)) {
+        if (isnumber2(value)) {
             callback();
         } else {
             callback(new Error("仅支持整数或两位小数!"))

+ 2 - 4
src/views/sellOut/salesOrder/components/wsm-in-order-addEdit-form.vue

@@ -130,7 +130,7 @@
   </el-form>
 </template>
 <script>
-import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
+import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import resToken from "@/mixins/resToken";
 import { isnumber, isnumber2, isAlphanumeric } from "@/utils/validate";
 export default {
@@ -142,9 +142,7 @@ export default {
       if (value === "") {
         callback(new Error("不能为空!"));
       } else {
-        if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
+       if (isnumber2(value)) {
           callback();
         } else {
           callback(new Error("仅支持整数或两位小数!"));

+ 61 - 0
src/views/sellOut/salesOrder/detail.vue

@@ -22,6 +22,14 @@
           v-if="status === '1' && powers.some((item) => item == '014')"
           >取消审核流程</el-button
         >
+         <el-button
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="statusConfirm('3', '开始发货')"
+          v-if="status === '2' && powers.some((item) => item == '026')"
+          >开始发货
+        </el-button>
         <el-button
           @click="statusConfirm('-1', '作废该条信息')"
           type="danger"
@@ -142,11 +150,64 @@ export default {
     handClick(value) {
       console.log("执行子组件事件", value);
       this.company = value;
+    },
+     async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
     },
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
 
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.queryId });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("check", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message, remark) {
+      let model = {
+        id: this.queryId,
+        remark: remark || "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        this.initData();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
     async examForm(e) {
       if (!this.loading) {
         let type = e.state === "1" ? "2" : "0";

+ 1 - 3
src/views/stock/allot/components/goStock-audit.vue

@@ -83,9 +83,7 @@ export default {
       if (value === "") {
         callback(new Error("物流费用不能为空!"));
       } else {
-         if (isnumber(value)) {
-          callback();
-        } else if (isnumber2(value)) {
+        if (isnumber2(value)) {
           callback();
         } else {
           callback(new Error("物流费用仅支持整数及两位小数!"));