Prechádzať zdrojové kódy

出库工单,发货数量限制输入的数据类型
出库工单-待出库,出库数量和订单数量修改
出库数量>订单数量时,不应出库完成
出库工单-待出库,单据里的订单信息去除
多个仓库之和大于订单数量不能成功发货
已出库的订单删除按钮不可点击
出库工单-出库完成页面问题
出库工单-待出库,仓库列修改
销售订单未出库之前,“ 销售退货 ”和“ 售后 ”按钮不应显示
销售订单数量只能输入正整数

Qukatie 1 týždeň pred
rodič
commit
a35b7342f6

+ 2 - 2
src/api/report/report.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/blade-report/report/rest/list',
+    url: '/api/gubersail-admin/report/rest/list',
     method: 'get',
     params: {
       ...params,
@@ -13,7 +13,7 @@ export const getList = (current, size, params) => {
 }
 export const remove = (ids) => {
   return request({
-    url: '/api/blade-report/report/rest/remove',
+    url: '/api/gubersail-admin/report/rest/remove',
     method: 'post',
     params: {
       ids,

+ 42 - 123
src/views/outboundWorkOrder/detailsPage.vue

@@ -87,6 +87,18 @@
                 </dic-select>
                 <span v-else>{{ row.reservoirArea }}</span>
               </tempalte>
+              <tempalte slot-scope="{ row, index }" slot="sendNum">
+                <el-input-number
+                  v-if="row.$cellEdit"
+                  size="small"
+                  v-model="row.sendNum"
+                  :precision="numberDecimal"
+                  :controls="false"
+                  :max="Number(row.goodsNum)"
+                  style="width: 100%"
+                ></el-input-number>
+                <span v-else>{{ row.sendNum }}</span>
+              </tempalte>
               <template slot-scope="{ type, size, row, index, disabled }" slot="menu">
                 <!--<el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"-->
                 <!--  :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑-->
@@ -144,17 +156,6 @@
               </template>
             </avue-crud>
           </el-tab-pane>
-          <el-tab-pane label="订单信息" name="payment_details">
-            <avue-crud
-              :option="optionPaymentDetails"
-              v-model="formContacts"
-              ref="payment_details"
-              :data="form.shipVOList"
-              :key="key"
-              @row-save="rowSave"
-              @row-update="rowUpdate" >
-            </avue-crud>
-          </el-tab-pane>
           <el-tab-pane label="历史记录" name="outbound_records">
             <avue-crud
               :option="optionOutboundRecords"
@@ -219,7 +220,6 @@ export default {
       isAddDisabled: false,
       form: {
         shipItemsList: [],
-        shipVOList: [],
         historyList: [],
       },
       key: 0,
@@ -344,7 +344,7 @@ export default {
             ],
           },
           {
-            label: "出库数量",
+            label: "发货数量",
             prop: "sendTotalNum",
             disabled: true,
           },
@@ -465,14 +465,13 @@ export default {
             prop: "inventory",
           },
           {
-            label: "出库数量",
+            label: "订单数量",
             prop: "goodsNum",
             disabled: false,
           },
           {
             label: "发货数量",
             prop: "sendNum",
-            cell: true,
             disabled: false,
           },
           {
@@ -491,60 +490,6 @@ export default {
           },
         ],
       },
-      optionPaymentDetails: {
-        align: "center",
-        index: true,
-        addBtnText: "录入明细",
-        refreshBtn: false,
-        dialogDrag: true,
-        addBtn: false,
-        span: 8,
-        height: 600,
-        addRowBtn: false,
-        editBtn: false,
-        delBtn: false,
-        menuWidth: 140,
-        dialogTop: 25,
-        dialogWidth: "80%",
-        menu: false,
-        column: [
-          {
-            label: "出库单号",
-            prop: "billno",
-            overHidden: true,
-          },
-          {
-            label: "来源单号",
-            prop: "ordNo",
-            overHidden: true,
-          },
-          {
-            label: "业务来源",
-            prop: "bsType",
-            overHidden: true,
-          },
-          {
-            label: "地址",
-            prop: "recAddress",
-            overHidden: true,
-          },
-          {
-            label: "联系人",
-            prop: "contacts",
-            overHidden: true,
-          },
-          {
-            label: "电话",
-            prop: "phone",
-            overHidden: true,
-          },
-          {
-            label: "备注",
-            prop: "remarks",
-            overHidden: true,
-          },
-        ],
-      },
       optionOutboundRecords: {
         align: "center",
         index: true,
@@ -716,7 +661,6 @@ export default {
       // this.$refs.formContacts.rowEdit(row, index)
     },
     complete() {
-      console.log(this.form.id);
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
@@ -765,8 +709,6 @@ export default {
             .finally(() => {
               loading.close();
             });
-        } else {
-          this.$message.error("请选择库管");
         }
       });
     },
@@ -856,61 +798,35 @@ export default {
         spinner: "el-icon-loading",
         background: "rgba(255,255,255,0.7)",
       });
-      if (!this.detailData.id) {
-        getDetails({ id: id })
-          .then((res) => {
-            if (res.data.data.statusName == "已出库") {
-              this.$set(this.optionForm, "disabled", true);
-              this.isAddDisabled = true;
-              this.optionContacts.column.forEach((item) => {
-                if (item.prop == "sendNum") {
-                  item.disabled = true;
-                }
-              });
-            }
+      getDetails({ id: id })
+        .then((res) => {
+          if (res.data.data.statusName == "已出库") {
+            this.$set(this.optionForm, "disabled", true);
             this.isAddDisabled = true;
-            if (res.data.data.statusName == "待出库") {
-              this.isAddDisabled = true;
-              this.isDisabled = true;
-            }
-            this.form = res.data.data;
-            this.filesList = res.data.data.filesList;
-            this.$nextTick(() => {
-              this.$refs.formContacts.refreshTable();
+            this.optionContacts.column.forEach((item) => {
+              if (item.prop == "sendNum") {
+                item.disabled = true;
+              }
             });
-            loading.close();
-          })
-          .catch(() => {
-            loading.close();
-          });
-      } else {
-        getDetails({ id: this.detailData.id })
-          .then((res) => {
-            if (res.data.data.statusName == "已出库") {
-              this.$set(this.optionForm, "disabled", true);
-              this.isAddDisabled = true;
-              this.optionContacts.column.forEach((item) => {
-                if (item.prop == "sendNum") {
-                  item.disabled = true;
-                }
-              });
-            }
+          }
+          this.isAddDisabled = true;
+          if (res.data.data.statusName == "待出库") {
             this.isAddDisabled = true;
-            if (res.data.data.statusName == "待出库") {
-              this.isAddDisabled = true;
-              this.isDisabled = true;
-            }
-            this.form = res.data.data;
-            this.filesList = res.data.data.filesList;
-            this.$nextTick(() => {
-              this.$refs.formContacts.refreshTable();
-            });
-            loading.close();
-          })
-          .catch(() => {
-            loading.close();
+            this.isDisabled = true;
+          }
+          res.data.data.businesDate = res.data.data.businesDate
+            ? res.data.data.businesDate
+            : dateFormat(new Date(), "yyyy-MM-dd");
+          this.form = res.data.data;
+          this.filesList = res.data.data.filesList;
+          this.$nextTick(() => {
+            this.$refs.formContacts.refreshTable();
           });
-      }
+          loading.close();
+        })
+        .catch(() => {
+          loading.close();
+        });
     },
     rowDelBox(row, index) {
       this.$confirm("确定将选择数据删除?", {
@@ -994,6 +910,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-form-item__error {
+  display: none !important;
+}
 ::v-deep .el-form-item {
   margin-bottom: 8px !important;
 }

+ 31 - 27
src/views/outboundWorkOrder/index.vue

@@ -57,7 +57,7 @@
         <template slot-scope="{ type, size, row, index }" slot="menu">
           <el-button
             :size="size"
-            :disabled="row.status !== '待出库' && row.item >= 1"
+            :disabled="row.statusName != '待出库'"
             :type="type"
             @click="$refs.crud.rowDel(row, index)"
             >删除</el-button
@@ -297,15 +297,8 @@ export default {
           },
           {
             label: "品牌",
-            prop: "brandId",
-            disabled: true,
-            width: 100,
+            prop: "brandName",
             overHidden: true,
-            props: {
-              label: "cname",
-              value: "id",
-            },
-            dicUrl: "/api/gubersail-admin/brandDesc/listAll?type=PP&enableOrNot=1",
           },
           {
             label: "规格型号",
@@ -320,6 +313,11 @@ export default {
             width: 100,
           },
           {
+            label: "仓库",
+            prop: "storageName",
+            overHidden: true,
+          },
+          {
             label: "商品描述",
             prop: "goodsDescription",
             disabled: true,
@@ -409,19 +407,19 @@ export default {
             // },
             // dicUrl: '/api/gubersail-admin/corpsDesc/list?current=1&size=20&corpType=KH&cname={{key}}',
           },
-          {
-            label: "仓库",
-            prop: "storageName",
-            search: true,
-            overHidden: true,
-            filterable: true,
-            type: "select",
-            props: {
-              label: "cname",
-              value: "cname",
-            },
-            dicUrl: "/api/gubersail-admin/storageDesc/listAll",
-          },
+          // {
+          //   label: "仓库",
+          //   prop: "storageName",
+          //   search: true,
+          //   overHidden: true,
+          //   filterable: true,
+          //   type: "select",
+          //   props: {
+          //     label: "cname",
+          //     value: "cname",
+          //   },
+          //   dicUrl: "/api/gubersail-admin/storageDesc/listAll",
+          // },
           // , {
           //   label: '商品种类',
           //   prop: "numberRows",
@@ -670,10 +668,10 @@ export default {
       console.log(tab.name, event);
       if (tab.name == "待生成") {
         this.query.statusName = tab.name;
-          this.onLoad2(this.page2, this.query);
+        this.onLoad2(this.page2, this.query);
       } else {
         this.search.statusName = tab.name;
-        this.onLoad(this.page,this.search);
+        this.onLoad(this.page, this.search);
       }
     },
     onLoad(page, params = {}) {
@@ -833,14 +831,20 @@ export default {
         sum += Number(item.sendNum);
       }
       if (sum > row.goodsNum) {
-        row.sendNum = 0;
-        return this.$message.error("发货数量合计不能超过订单数量");
+        return this.$message.error("发货数量合计不能超过订单数量:"+row.goodsNum);
       }
     },
     generate() {
-      if(this.generateData.filter((item) => item.sendNum > 0).length==0){
+      if (this.generateData.filter((item) => item.sendNum > 0).length == 0) {
         return this.$message.error("发货数量不能为0");
       }
+      let sum = 0;
+      for (let item of this.generateData) {
+        sum += Number(item.sendNum);
+      }
+      if (sum > this.generateForm.goodsNum){
+        return this.$message.error("发货数量合计不能超过订单数量:"+this.generateForm.goodsNum);
+      }
       let obj = {
         ...this.generateForm,
         shipItemsList: this.generateData.filter((item) => item.sendNum > 0),

+ 12 - 3
src/views/saleOrder/detailsPage.vue

@@ -54,7 +54,7 @@
           撤销订单确认
         </el-button>
         <el-button
-          v-if="form.id"
+          v-if="form.status == '已发货'"
           class="el-button--small-yh"
           style="margin-left: 6px"
           type="info"
@@ -241,6 +241,7 @@
                   :precision="numberDecimal"
                   :controls="false"
                   @change="goodsNumblurfun(row)"
+                  :min="1"
                   :max="Number(row.inventory)"
                   style="width: 100%"
                 ></el-input-number>
@@ -424,6 +425,7 @@
             <el-scrollbar>
               <basic-container>
                 <avue-tree
+                  ref="tree"
                   style="height: 60vh; overflow-y: auto"
                   :option="treeOption"
                   :data="treeDataGoods"
@@ -444,6 +446,7 @@
               @getDetail-change="refreshChange"
               @selection-change="selectionChange"
               @search-change="goodsSearch"
+              @search-reset="resetChange"
               :page.sync="page"
               @on-load="onLoadfun"
               @resetColumn="resetCrud"
@@ -459,6 +462,7 @@
                 <el-input-number
                   v-model="row.goodsNum"
                   size="small"
+                  :min="1"
                   :controls="false"
                   :precision="numberDecimal"
                   @input="amountChange($event, row)"
@@ -567,6 +571,7 @@ import { isProcurement } from "@/api/basicData/configuration.js";
 import { getList as inventoryList } from "@/api/salesManagement/inventory";
 import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import dicSelect from "@/components/dicSelect/main.vue";
+import reportDialog from "@/components/report-dialog/main";
 export default {
   name: "detailsPage",
   data() {
@@ -1595,7 +1600,7 @@ export default {
       },
     };
   },
-  components: { SearchQuery, dicSelect },
+  components: { SearchQuery, dicSelect,reportDialog},
   props: {
     onLoad: Object,
     detailData: Object,
@@ -1972,7 +1977,7 @@ export default {
               this.form.contacts = res.data.data.corpsAttnList[0].cname;
               this.form.phone = res.data.data.corpsAttnList[0].tel;
               this.contactsOption = res.data.data.corpsAddrList;
-              this.form.recAddress =res.data.data.corpsAddrList[0].detailedAddress;
+              this.form.recAddress = res.data.data.corpsAddrList[0].detailedAddress;
               this.form.salerId = res.data.data.salesmanId ? res.data.data.salesmanId : "";
               this.form.salerName = res.data.data.salesmanName ? res.data.data.salesmanName : "";
             }
@@ -2063,6 +2068,10 @@ export default {
       this.onLoadfun(this.page, params);
       done();
     },
+    resetChange() {
+      this.treeDeptId=null
+      this.$refs.tree.setCurrentKey(null);
+    },
     dicChange(name, row) {
       if (name == "salerName") {
         if (row) {