web100 2 éve
szülő
commit
9dee4c818b

+ 1 - 0
src/api/tirePartsMall/basicData/customerInformation/customerCategory.js

@@ -8,6 +8,7 @@ export function customerList(data) {
         params: data
     })
 }
+
 //客户类别列表修改和新增
 export function typeSave(data) {
     return request({

+ 7 - 0
src/api/tirePartsMall/purchasingManagement/warehouseEntryOrder.js

@@ -75,3 +75,10 @@ export const getWarehouseKeeper = (data) => {
     params: data
   })
 }
+export const dotListAll = (data) => {
+  return request({
+    url: '/api/blade-sales-part/stockDesc/dotListAll',
+    method: 'GET',
+    params: data
+  })
+}

+ 2 - 2
src/router/views/index.js

@@ -2009,7 +2009,7 @@ export default [{
   hidden: true,
   children: [{
     path: '/tirePartsMall/inventory/index',
-    name: '库存',
+    name: '库存查询',
     meta: {
       i18n: '/tirePartsMall/inventory/index',
       keepAlive: true,
@@ -2464,7 +2464,7 @@ export default [{
   hidden: true,
   children: [{
     path: '/tirePartsMall/purchasingManagement/warehouseEntryOrder/index',
-    name: '入库工单',
+    name: '采购入库',
     meta: {
       i18n: '/tirePartsMall/purchasingManagement/warehouseEntryOrder/index',
       keepAlive: true,

+ 1 - 0
src/views/supplier/detailsPage.vue

@@ -230,6 +230,7 @@ export default {
   methods: {
     getAllWorkDicts() {
       customerList({ corpType: "GYS" }).then(res => {
+        console.log(213234324);
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records
       });
       this.getWorkDicts("abbreviation").then(res => {

+ 1 - 1
src/views/tirePartsMall/basicData/commodityInformation/index.vue

@@ -6,7 +6,7 @@
           <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:82vh;">
             <template slot="addBtn">
               <i class="el-icon-setting" @click="goodsTypeVisible = true"
-                style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"></i>
+                style="font-size:18px;line-height: 30px;width: 20px;padding:10px;"></i>
             </template>
           </avue-tree>
         </el-col>

+ 3 - 2
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -123,7 +123,7 @@ import {
   corpsattn,
   editenable
 } from "@/api/tirePartsMall/basicData/customerInformation"
-import corpType from '@/components/corpType/index'
+import corpType from './components/index'
 import { creatingUsersTwo } from "@/api/basicData/customerInformation";
 import { getRoleTree } from "@/api/system/role";
 import { getDeptTree } from "@/api/system/dept";
@@ -402,7 +402,7 @@ export default {
               label: "name",
               value: "id"
             },
-            dicUrl: "/api/blade-user/client/gainUser",
+            dicUrl: "/api/blade-user/client/getUserByRole",
             filterable: true,
             rules: [{
               required: true,
@@ -651,6 +651,7 @@ export default {
             ...this.formDataThree,
           }).then(res => {
             this.dialogVisibleCK = false;
+            this.$message.success('新增成功')
             this.formDataThree = {}
             this.getCorpTypeCk()
           });

+ 6 - 4
src/views/tirePartsMall/basicData/customerInformation/index.vue

@@ -93,7 +93,7 @@ import {
   remove,
   customerList
 } from "@/api/tirePartsMall/basicData/customerInformation";
-import corpType from './components/index'
+import corpType from './components/index.vue'
 import { getToken } from "@/util/auth";
 
 export default {
@@ -312,7 +312,7 @@ export default {
         }
       }
       const routeData = this.$router.resolve({
-        path: '/api/blade-sales-part/corpsDesc/supplierExport',      //跳转目标窗口的地址
+        path: '/api/blade-sales-part/corpsDesc/pjCorpsExport',      //跳转目标窗口的地址
         query: {
           ...config.params,    //括号内是要传递给新窗口的参数
           identification: this.url
@@ -374,6 +374,7 @@ export default {
       this.show = false;
     },
     onLoad(page, params = {}) {
+      console.log('page',page);
       // this.$refs.crud.refreshTable()
       console.log('params',params);
       console.log('this.search',this.search);
@@ -386,8 +387,9 @@ export default {
       data.corpType = "KH"
       this.loading = true;
       getList({
-        ...page.currentPage,
-        ...page.pageSize,
+        current: page.currentPage,
+        size: page.pageSize,
+        // ...page.pageSize,
         ...data
       }).then(res => {
         this.dataList = res.data.data.records ? res.data.data.records : [];

+ 2 - 3
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -63,7 +63,7 @@ export const option = {
         label: "name",
         value: "id"
       },
-      dicUrl: "/api/blade-user/client/gainUser",
+      dicUrl: "/api/blade-user/client/getUserByRole",
       search: true,
     },
     {
@@ -85,7 +85,7 @@ export const option = {
       label: "是否启用",
       prop: "enableOrNot",
       overHidden: true,
-      hide: true,
+      search:true,
       showColumn: false,
       type: 'select',
       dicData: [{
@@ -141,7 +141,6 @@ export const option = {
       },
       dicData: [],
       hide: true,
-      search: true,
       showColumn: false,
       overHidden: true,
     },

+ 5 - 9
src/views/tirePartsMall/basicData/listingManagement/commodity.json

@@ -51,14 +51,15 @@
       },
       {
         "label": "品牌",
-        "prop": "brand",
+        "prop": "brandName",
         "slot": true,
-        "overHidden": true
+        "overHidden": true,
+        "search": true
+
       },
       {
         "label": "轮胎类别",
         "prop": "goodsTypeName",
-        "hide": true,
         "addDisabled": false,
         "multiple": true,
         "overHidden": true,
@@ -81,12 +82,7 @@
         "slot": true,
         "overHidden": true
       },
-      {
-        "label": "分类",
-        "prop": "categoryitem",
-        "slot": true,
-        "overHidden": true
-      },
+   
       {
         "label": "售价1",
         "prop": "priceOne",

+ 5 - 3
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -76,7 +76,7 @@
                 <el-input v-model="row.priceOne" size="small" :controls="false" :precision="0"></el-input>
               </template> -->
               <template slot="priceOne" slot-scope="{row}">
-                <el-input-number v-model="row.priceOne" size="small" :controls="false" :precision="0"
+                <el-input v-model="row.priceOne" size="small" :controls="false" :precision="0"
                   style="width: 100%" />
               </template>
               <template slot="priceTwo" slot-scope="{ row }">
@@ -547,12 +547,14 @@ export default {
   },
   goodsListSaveHandle() {
     this.goodsListSave.forEach(item => {
-      item.sharedCompany ? item.sharedCompany.join(',') : ''
+      // item.sharedCompany ? item.sharedCompany.join(',') : ''
+      item.sharedCompany = item.sharedCompany.toString();
       this.goodsListSave.specificationAndModel = item.typeno
       delete this.goodsListSave.typeno
+      // item.sharedCompany = JSON.stringify(item.sharedCompany)
+      // console.log();
     })
 
-    console.log(this.goodsListSave);
     productLaunch(this.goodsListSave).then(res => {
       console.log(res);
       this.dialogVisibles = !this.dialogVisibles

+ 267 - 0
src/views/tirePartsMall/basicData/supplier/components/corpType/index.vue

@@ -0,0 +1,267 @@
+<template>
+    <avue-crud
+        :option="option"
+        :data="dataList"
+        ref="crud"
+        v-model="form"
+        :page.sync="page"
+        @row-del="rowDel"
+        @row-update="rowUpdate"
+        :before-open="beforeOpen"
+        :before-close="beforeClose"
+        :table-loading="loading"
+        @row-save="rowSave"
+        :search.sync="search"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @selection-change="selectionChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @saveColumn="saveColumn"
+        @resetColumn="resetColumn"
+        @on-load="onLoad"
+        @tree-load="treeLoad"
+    >
+      <!--<template slot-scope="scope" slot="menu">-->
+      <!--  <el-button-->
+      <!--    type="text"-->
+      <!--    icon="el-icon-circle-plus-outline"-->
+      <!--    size="small"-->
+      <!--    @click.stop="handleAdd(scope.row, scope.index)"-->
+      <!--    >新增子项-->
+      <!--  </el-button>-->
+      <!--</template>-->
+    </avue-crud>
+  </template>
+  
+  <script>
+  import option from "../../configuration/mainList.json";
+  import {
+    customerList,
+    typeSave,
+    detail,
+    deleteDetails
+  } from "@/api/tirePartsMall/basicData/customerInformation/customerCategory";
+  import {customerParameter} from "@/enums/management-type";
+  
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        search: {},
+        option: option,
+        loading: false,
+        parentId: 0,
+        dataList: [],
+        page: {
+          pageSize: 20,
+          currentPage: 1,
+          total: 0,
+          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        query: {}
+      };
+    },
+    props:{
+      corpType:String
+    },
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(141.2), option);
+      this.option.height = window.innerHeight - 500;
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          return deleteDetails(row.id);
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+      },
+      //修改时的修改按钮点击触发
+      rowUpdate(row, index, done, loading) {
+        row.corpType = this.corpType?this.corpType:customerParameter.code;
+        typeSave(row).then(
+          () => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            // 数据回调进行刷新
+            done(row);
+            this.onLoad(this.page);
+          },
+          error => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      //新增修改时保存触发
+      rowSave(row, done, loading) {
+        row.corpType = this.corpType?this.corpType:customerParameter.code;
+        typeSave(row).then(
+          res => {
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            done(row);
+            this.onLoad(this.page);
+          },
+          error => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      //查询全部
+      initData() {
+        // customerList({corpType: this.corpType?this.corpType:customerParameter.code}).then(res => {
+        //   const column = this.findObject(this.option.column, "parentId");
+        //   column.dicData = res.data.data.records;
+        // });
+      },
+      //新增子项触发
+      handleAdd(row) {
+        // this.parentId = row.id;
+        // const column = this.findObject(this.option.column, "parentId");
+        // column.value = row.id;
+        // column.addDisabled = true;
+        this.$refs.crud.rowAdd();
+      },
+      //新增子项和新增触发查询所有
+      beforeOpen(done, type) {
+        if (["add", "edit"].includes(type)) {
+          this.initData();
+        }
+        if (["edit", "view"].includes(type)) {
+          detail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      //点击新增时触发
+      beforeClose(done) {
+        // this.parentId = "";
+        // const column = this.findObject(this.option.column, "parentId");
+        // column.value = "";
+        // column.addDisabled = false;
+        done();
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        params.parentId = 0;
+        this.onLoad(this.page, params);
+        done();
+      },
+      searchReset() {
+        console.log("1");
+      },
+      selectionChange() {
+        console.log("1");
+      },
+      currentChange() {
+        console.log("1");
+      },
+      sizeChange() {
+        console.log("1");
+      },
+      refreshChange() {
+        console.log("1");
+      },
+      onLoad(page, params = {}) {
+        console.log('sdkfkjndkfn');
+        this.loading = true;
+        const {createTimeA} = this.query;
+        let values = {
+          ...params,
+          corpType: this.corpType?this.corpType:customerParameter.code,
+          size: this.page.pageSize,
+          current: this.page.currentPage
+        };
+        if (createTimeA) {
+          values = {
+            ...params,
+            createTime: createTimeA[0] + " 00:00:00",
+            endTime: createTimeA[1] + " 23:59:59",
+            ...this.query,
+            size: this.page.pageSize,
+            current: this.page.currentPage
+          };
+          values.createTimeA = null;
+        }
+        values.parentId = 0;
+        console.log(233324);
+        customerList(values)
+          .then(res => {
+            console.log('走123');
+            console.log(res.data.data.records);
+            this.dataList = res.data.data.records;
+            this.page.total = res.data.data.total;
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      },
+      async saveColumn() {
+        /**
+         * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+         * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+         * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+         */
+        const inSave = await this.saveColumnData(
+          this.getColumnName(141.2),
+          this.option
+        );
+        if (inSave) {
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      async resetColumn() {
+        this.option = option;
+        const inSave = await this.delColumnData(this.getColumnName(141.2), option);
+        if (inSave) {
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
+          this.$message.success("重置成功");
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      //树桩列点击展开触发
+      treeLoad(tree, treeNode, resolve) {
+        const parentId = tree.id;
+        customerList({parentId: parentId}).then(res => {
+          resolve(res.data.data.records);
+        });
+      }
+    }
+  };
+  </script>
+  
+  <style scoped>
+  .page-crad ::v-deep .basic-container__card {
+      height: 94.8vh;
+  }
+  </style>
+  

+ 3 - 0
src/views/tirePartsMall/basicData/supplier/components/index.vue

@@ -185,6 +185,7 @@ export default {
       console.log("1");
     },
     onLoad(page, params = {}) {
+      console.log('sdkfkjndkfn');
       this.loading = true;
       const {createTimeA} = this.query;
       let values = {
@@ -205,8 +206,10 @@ export default {
         values.createTimeA = null;
       }
       values.parentId = 0;
+      console.log(233324);
       customerList(values)
         .then(res => {
+          console.log(res.data.data.records);
           this.dataList = res.data.data.records;
           this.page.total = res.data.data.total;
         })

+ 3 - 3
src/views/tirePartsMall/basicData/supplier/detailsPage.vue

@@ -70,7 +70,7 @@
       </trade-card>
       <trade-card title="附件信息">
         <c-upload basic :data="form.corpsFilesList" :disabled="disabled"
-          deleteUrl="/api/blade-box-tube/shippingfile/remove" :enumerationValue="262.3" display />
+          deleteUrl="/api/blade-sales-part/corpsfiles/remove" :enumerationValue="262.3" display />
       </trade-card>
     </div>
     <el-dialog title="设置供应商分类" append-to-body v-dialog-drag :visible.sync="corpTypeVisible" class="avue-dialog"
@@ -93,7 +93,7 @@
 // import {detail, submit} from "@/api/basicData/shipManagement";
 import { getDetails, submit, editenable, corpsattn, itemDel } from "@/api/tirePartsMall/basicData/customerInformation";
 import { getCorpType } from "@/api/tirePartsMall/basicData/customerInformation"
-import corpType from '@/components/corpType/index'
+import corpType from './components/corpType/index.vue'
 export default {
   name: "detailsPage",
   data() {
@@ -144,7 +144,7 @@ export default {
             label: "name",
             value: "id"
           },
-          dicUrl: "/api/blade-user/client/gainUser",
+          dicUrl: "/api/blade-user/client/getUserByRole",
           filterable: true,
           rules: [{
             required: true,

+ 14 - 2
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -6,9 +6,13 @@
           <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
             @save="corpTypeVisible = true">
             <template slot="addBtn">
-              <i class="el-icon-setting" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
+              <i class="el-icon-setting" title="新建分类" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
                 @click="corpTypeVisible = true"></i>
             </template>
+            <template slot="addBtn">
+              <i class="el-icon-refresh-right" title="刷新" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
+                @click="refresh"></i>
+            </template>
           </avue-tree>
         </el-col>
         <el-col :span="20">
@@ -189,7 +193,7 @@ export default {
             label: "name",
             value: "id"
           },
-          dicUrl: "/api/blade-user/client/gainUser",
+          dicUrl: "/api/blade-user/client/getUserByRole",
           filterable: true,
           overHidden: true
         }, {
@@ -215,6 +219,7 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(262), this.optionList);
     this.key++
     getCorpType({ corpType: 'GYS' }).then(res => {
+      console.log('看看');
       this.treeData = res.data.data
     });
     let i = 0;
@@ -260,6 +265,12 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page, this.search);
     },
+    refresh(){
+      getCorpType({ corpType: 'GYS' }).then(res => {
+      console.log('看看');
+      this.treeData = res.data.data
+    });
+    },
     derivation() {
       window.open(
         `/api/blade-sales-part/corpsDesc/supplierExport?${this.website.tokenHeader
@@ -369,4 +380,5 @@ export default {
 ::v-deep .el-input-group__append {
   padding: 0 0px !important;
 }
+
 </style>

+ 165 - 127
src/views/tirePartsMall/inventory/index.vue

@@ -1,38 +1,40 @@
 <template>
   <div>
     <basic-container v-show="!detailsOpen">
-      <avue-crud
-          :option="option"
-          :search.sync="search"
-          v-model="form"
-          :table-loading="loading"
-          :data="dataList"
-          ref="crud"
-          :key="key"
-          @on-load="onLoad"
-          @search-change="searchChange"
-          @refresh-change="refreshChange"
-          @resetColumn="resetColumnTwo('crud','option','optionList',268)"
-          @saveColumn="saveColumnTwo('crud','option','optionList',268)"
-          :page.sync="page">
-        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
-        </template>
-      </avue-crud>
+      <el-row>
+        <el-col :span="4">
+          <avue-tree ref="treeRef" :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
+            @save="corpTypeVisible = true">
+          </avue-tree>
+        </el-col>
+        <el-col :span="20">
+          <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+            ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 268)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 268)" :page.sync="page">
+            <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+              <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
+            </template>
+          </avue-crud>
+        </el-col>
+      </el-row>
     </basic-container>
   </div>
 </template>
 
 <script>
-import {getList} from "@/api/tirePartsMall/inventory";
-import {getToken} from "@/util/auth";
+import { getList } from "@/api/tirePartsMall/inventory";
+import { getToken } from "@/util/auth";
+import { getCorpType } from "@/api/tirePartsMall/basicData/commodityInformation";
 
 export default {
   name: "index",
   data() {
     return {
       detailsOpen: false,
+      treeData: [],
       loading: false,
+      corpTypeVisible: false,
       search: {},
       form: {},
       dataList: [],
@@ -44,6 +46,16 @@ export default {
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       key: 0,
+      treeOption: {
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "value",
+        }
+      },
       option: {},
       optionList: {
         viewBtn: false,
@@ -51,10 +63,10 @@ export default {
         delBtn: false,
         addBtn: false,
         index: true,
-        width:'100%',
+        width: '100%',
         span: 8,
         border: true,
-        menu:false,
+        menu: false,
         height: "auto",
         searchMenuPosition: "right",
         align: "center",
@@ -67,110 +79,125 @@ export default {
         dialogWidth: "70%",
         summaryText: "合计",
         showSummary: true,
-        sumColumnList:[
-            {
-              name: 'balanceQuantity',
-              type: 'sum',
-            },
-            {
-              name: 'storeInventory',
-              type: 'sum',
-            },
-            {
-              name: 'inventoryAmount',
-              type: 'sum',
-            },
+        sumColumnList: [
+          {
+            name: 'balanceQuantity',
+            type: 'sum',
+          },
+          {
+            name: 'storeInventory',
+            type: 'sum',
+          },
+          {
+            name: 'inventoryAmount',
+            type: 'sum',
+          },
         ],
         column: [
-        {
-          label: '轮胎名称',
-          prop: "cname",
-          search: true,
-          overHidden: true,
-        },
-        {
-          label: '轮胎编码',
-          prop: "code",
-          search: true,
-          overHidden: true,
-        },{
-          label: '品牌',
-          prop: "brandName",
-          searchProp: "brandId",
-          search: true,
-          overHidden: true,
-          type: 'select',
-          props: {
-            label: 'cname',
-            value: 'id'
-          },
-          dicUrl: '/api/blade-sales-part/brandDesc/listAll',
-          width:100
-        },{
-          label: '规格型号',
-          prop: "typeno",
-          search: true,
-          overHidden: true,
-          width:100
-        },{
-          label: '花纹',
-          prop: "brandItem",
-          overHidden: true,
-          width:100
-        },{
-          label: '轮胎描述',
-          prop: "productDescription",
-          overHidden: true,
-          width:100
-        },{
-          label: '分类',
-          prop: "goodsTypeName",
-          overHidden: true,
-          width:100
-        },{
-          label: '仓库',
-          prop: "storageName",
-          searchProp: "storageId",
-          search: true,
-          overHidden: true,
-          type: 'select',
-          props: {
-            label: 'cname',
-            value: 'id'
+          {
+            label: '轮胎名称',
+            prop: "cname",
+            search: true,
+            overHidden: true,
           },
-          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
-          width:100
-        },{
-          label: '库存数量',
-          prop: "balanceQuantity",
-          overHidden: true,
-          width:100
-        },{
-          label: '库存单价',
-          prop: "inventoryCostPrice",
-          overHidden: true,
-          width:100
-        },{
-          label: '批次',
-          prop: "dot",
-          overHidden: true,
-          width:100
-        },{
-          label: '上架库存',
-          prop: "storeInventory",
-          overHidden: true,
-          width:100
-        },{
-          label: '库存金额',
-          prop: "inventoryAmount",
-          overHidden: true,
-          width:100
-        },{
-          label: '库存预警',
-          prop: "inventoryAlert",
-          overHidden: true,
-          width:100
-        }]
+          {
+            label: '轮胎编码',
+            prop: "code",
+            search: true,
+            overHidden: true,
+          }, {
+            label: '品牌',
+            prop: "brandName",
+            searchProp: "brandId",
+            search: true,
+            overHidden: true,
+            type: 'select',
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/brandDesc/listAll',
+            width: 100
+          }, {
+            label: '规格型号',
+            prop: "typeno",
+            search: true,
+            overHidden: true,
+            width: 100
+          }, {
+            label: '花纹',
+            prop: "brandItem",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '轮胎描述',
+            prop: "productDescription",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '分类',
+            prop: "goodsTypeName",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '仓库',
+            prop: "storageName",
+            searchProp: "storageId",
+            search: true,
+            overHidden: true,
+            type: 'select',
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+            width: 100
+          }, {
+            label: '库存数量',
+            prop: "balanceQuantity",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '库存单价',
+            prop: "inventoryCostPrice",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '批次',
+            prop: "dot",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '上架库存',
+            prop: "storeInventory",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '库存金额',
+            prop: "inventoryAmount",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '库存预警',
+            prop: "inventoryAlert",
+            overHidden: true,
+            width: 100
+          }, {
+            label: '存在库存',
+            prop: "whether",
+            overHidden: true,
+            search: true,
+            type:'select',
+            showColumn:false,
+            width: 100,
+            dicData: [{
+              "label": "是",
+              "value": 0
+            }, {
+              "label": "否",
+              "value": 1
+            }]
+          }]
       }
     }
   },
@@ -186,10 +213,12 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    this.getAllWorkDicts()
+
   },
   methods: {
     outExport() {
-      let config = {params: {...this.search}}
+      let config = { params: { ...this.search } }
       if (config.params) {
         for (const propName of Object.keys(config.params)) {
           const value = config.params[propName];
@@ -224,6 +253,17 @@ export default {
       }
       this.onLoad(this.page, this.search)
     },
+    getAllWorkDicts() {
+      getCorpType({ corpType: 'SP' }).then(res => {
+        this.treeData = res.data.data;
+        // this.findObject(this.option2.column, "parentId").dicData = res.data.data;
+      });
+    },
+    nodeClick(data) {
+      this.search.goodsTypeId = data.value
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.search);
+    },
     //刷新
     refreshChange() {
       this.onLoad(this.page, this.search)
@@ -274,6 +314,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 137 - 109
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -7,9 +7,9 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                       <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="form.id"
-                                  @click="confirmEditing">编辑
-                       </el-button>
+                <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small"
+                    v-if="form.id" @click="confirmEditing">编辑
+                </el-button>
                 <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.statusName != '已入库'"
                     @click="editCustomer">保存数据
                 </el-button>
@@ -34,16 +34,16 @@
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)">
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
-                                    @click="rowEdit(row, index)">编辑
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
                                 </el-button>
-                                <el-button icon="el-icon-delete" :size="size" :disabled="disabled || form.statusName == '已入库'" :type="type"
+                                <el-button icon="el-icon-delete" :size="size"
+                                    :disabled="disabled || form.statusName == '已入库'" :type="type"
                                     @click="rowDelBox(row, index)">删除
                                 </el-button>
                             </template>
                             <template slot-scope="{scope,row}" slot="menuLeft">
-                                <el-button type="primary" icon="el-icon-plus" size="small" 
-                                    @click="rowAdd(row,score)" :disabled="isrowAdd">添加轮胎</el-button>
+                                <el-button type="primary" icon="el-icon-plus" size="small" @click="rowAdd(row, score)"
+                                    :disabled="isrowAdd">添加轮胎</el-button>
                                 <el-button type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
                                 </el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
@@ -95,7 +95,8 @@ import {
     revoke,
     goodsDetail,
     dotList,
-    getWarehouseKeeper
+    getWarehouseKeeper,
+    dotListAll
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -108,7 +109,7 @@ export default {
             switchDialog: false,
             activeName: "sale_detail",
             disabled: false,
-            isrowAdd:true,
+            isrowAdd: true,
             excelBox: false,
             excelOption: {
                 submitBtn: false,
@@ -153,7 +154,7 @@ export default {
                     {
                         label: "业务对象",
                         prop: "customerId",
-                        disabled:false,
+                        disabled: false,
                         type: 'select',
                         props: {
                             label: 'cname',
@@ -175,12 +176,12 @@ export default {
                         overHidden: true,
                         type: 'select',
                         dicUrl: "/api/blade-sales-part/storageDesc/listAll",
-                        disabled:false,
+                        disabled: false,
                         props: {
                             label: 'cname',
                             value: 'id'
                         },
-                        
+
                         rules: [
                             {
                                 required: true,
@@ -200,7 +201,7 @@ export default {
                         label: '库管',
                         prop: "stockClerkId",
                         type: 'select',
-                        disabled:false,
+                        disabled: false,
                         props: {
                             label: 'realName',
                             value: 'id'
@@ -217,7 +218,7 @@ export default {
                         prop: "goodsTotalNum",
                         search: false,
                         overHidden: true,
-                        disabled:false,
+                        disabled: false,
                         // width: 120,
                         // rules: [
                         //     {
@@ -230,7 +231,7 @@ export default {
                     {
                         label: "业务日期",
                         prop: "createTime",
-                        disabled:false,
+                        disabled: false,
                         type: "datetime",
                         value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
                         format: "yyyy-MM-dd HH:mm",
@@ -246,16 +247,16 @@ export default {
                     {
                         label: "入库单号",
                         prop: "billno",
-                        disabled:false,
+                        disabled: false,
                     },
                     {
                         label: "来源单号",
                         prop: "ordNo",
-                        disabled:false,
+                        disabled: false,
 
                     }, {
                         label: '备注',
-                        disabled:false,
+                        disabled: false,
                         prop: "remarks",
                         type: 'textarea',
                         span: 16,
@@ -278,14 +279,14 @@ export default {
                 index: true,
                 menu: true,
                 dialogTop: 25,
-                disabled:false,
+                disabled: false,
                 dialogWidth: "80%",
                 column: [{
                     label: '轮胎名称',
                     prop: 'goodsId',
                     width: 200,
                     overHidden: true,
-                    disabled:false,
+                    disabled: false,
                     filterable: true,
                     type: 'select',
                     props: {
@@ -294,17 +295,69 @@ export default {
                     },
                     dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
                 }, {
+                    label: "价格",
+                    prop: "price",
+                    disabled: false,
+                    ovrHidden: true,
+                    rules: [{
+                        required: true,
+                        message: " ",
+                        trigger: "blur"
+                    }, {
+                        validator: (rule, value, callback) => {
+                            if (value < 0) {
+                                callback(new Error("单价不能小于0"));
+                            } else {
+                                callback();
+                            }
+                        },
+                        trigger: "blur"
+                    }]
+                }, {
+                    label: "实际数量",
+                    prop: "sendNum",
+                    disabled: false,
+                    overHidden: true,
+                    rules: [{
+                        required: true,
+                        message: " ",
+                        trigger: "blur"
+                    },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (value < 0) {
+                                callback(new Error("实际数量不能小于0"));
+                            } else {
+                                callback();
+                            }
+                        },
+                        trigger: "blur"
+                    }]
+                }, {
+                    label: "批次号",
+                    prop: "dot",
+                    type: "select",
+                    disabled: false,
+                    allowCreate: true,
+                    filterable: true,
+                    dicData: [],
+                    props: {
+                        label: "dot",
+                        value: "dot"
+                    },
+                    overHidden: true
+                }, {
                     label: '物料编码',
                     prop: 'goodsNo',
                     overHidden: true,
-                    disabled:false,
+                    disabled: false,
                     width: 140
                 }, {
                     label: "品牌",
                     prop: 'brandId',
                     width: 100,
                     overHidden: true,
-                    disabled:false,
+                    disabled: false,
                     type: 'select',
                     props: {
                         label: 'cname',
@@ -315,74 +368,41 @@ export default {
                     label: "规格型号",
                     prop: "propertyName",
                     overHidden: true,
-                    disabled:false,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    }]
+                    disabled: false,
+                    // rules: [{
+                    //     required: true,
+                    //     message: " ",
+                    //     trigger: "blur"
+                    // }]
                 }, {
                     label: "花纹",
                     prop: "pattern",
-                    disabled:false,
+                    disabled: false,
                     overHidden: true
                 }, {
                     label: "轮胎描述",
                     prop: "goodsDescription",
-                    disabled:false,
-                    overHidden: true
-                }, {
-                    label: "批次号",
-                    prop: "dot",
-                    type: "select",
                     disabled: false,
-                    allowCreate: true,
-                    filterable: true,
-                    dicData: [],
-                    props: {
-                        label: "dot",
-                        value: "dot"
-                    },
                     overHidden: true
                 }, {
                     label: "单位",
                     prop: 'units',
                     type: "select",
-                    disabled:false,
+                    disabled: false,
                     props: {
                         label: "dictValue",
                         value: "dictValue"
                     },
                     dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
                 }, {
-                    label: "单价",
-                    prop: "price",
-                    disabled:false,
-                    ovrHidden: true,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    }]
-                }, {
                     label: "入库数量",
                     prop: "goodsNum",
                     disabled: true,
                     ovrHidden: true,
                 }, {
-                    label: "实际数量",
-                    prop: "sendNum",
-                    disabled:false,
-                    overHidden: true,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    }]
-                }, {
                     label: "备注",
                     prop: "remarks",
-                    disabled:false,
+                    disabled: false,
                     overHidde: true
                 }]
             },
@@ -454,7 +474,7 @@ export default {
                     {
                         prop: "remarks",
                         label: "备注",
-                        disabled:false,
+                        disabled: false,
                         overHidden: true,
                         cell: true
                     }
@@ -501,13 +521,17 @@ export default {
     async created() {
         this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
             console.log(value);
-            console.log('this.formContacts.goodsId',this.formContacts.goodsId);
+            console.log('this.formContacts.goodsId', this.formContacts.goodsId);
             if (this.formContacts.goodsId !== value) {
+                dotListAll({
+                    storageId: this.form.storageId,
+                    goodsId: this.formContacts.goodsId
+            }).then(res=>{this.formContacts.price = res.data.data[0].inventoryCostPrice,console.log(res)})
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
                     this.formContacts.brandName = res.data.data.brandName
-                    
+
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
@@ -530,13 +554,17 @@ export default {
         this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
         this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
             console.log(value);
-            console.log('this.formContacts.goodsId',this.formContacts.goodsId);
+            console.log('this.formContacts.goodsId', this.formContacts.goodsId);
             if (this.formContacts.goodsId !== value) {
+                dotListAll({
+                    storageId: this.form.storageId,
+                    goodsId: this.formContacts.goodsId
+            }).then(res=>{ this.formContacts.price = res.data.data[0].inventoryCostPrice})
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
                     this.formContacts.brandName = res.data.data.brandName
-                    
+
                     this.formContacts.propertyName = res.data.data.specificationAndModel
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
@@ -561,15 +589,15 @@ export default {
         this.key++
         if (this.onLoad.id && this.detailData.id) {
             this.refresh(this.onLoad.id, true)
-            this.$set(this.optionForm,'disabled',true)
-            this.$set(this.optionContactsBack,'disabled',true)
+            this.$set(this.optionForm, 'disabled', true)
+            this.$set(this.optionContactsBack, 'disabled', true)
         } else if (this.onLoad.id) {
             console.log(2);
             this.refresh(this.onLoad.id, true)
         }
-        if(!this.onLoad.id){
+        if (!this.onLoad.id) {
             console.log(3);
-            this.isrowAdd= false
+            this.isrowAdd = false
             // this.$set(this.optionForm,'disabled',false)
             // this.$set(this.optionContacts,'disabled',false)
         }
@@ -585,13 +613,13 @@ export default {
     },
 
     methods: {
-        rowAdd(row,score){
+        rowAdd(row, score) {
             console.log(123214);
             this.optionContactsBack.column.forEach(its => {
-                if (its.prop == 'goodsNum') {
-                    this.$set(its,'disabled',true)
+                if (its.prop == 'goodsNum' || its.prop == 'goodsNo' || its.prop == 'brandId' || its.prop == 'propertyName' || its.prop == 'pattern' || its.prop == 'goodsDescription' || its.prop == 'units') {
+                    this.$set(its, 'disabled', true)
                 } else {
-                    this.$set(its,'disabled',false)
+                    this.$set(its, 'disabled', false)
                 }
             })
             this.$refs.formContacts.rowAdd()
@@ -639,42 +667,42 @@ export default {
             })
         },
         //编辑
-        confirmEditing(){
-            if(this.form.statusName == '待入库'){
+        confirmEditing() {
+            if (this.form.statusName == '待入库') {
                 this.isrowAdd = false
-                this.$set(this.optionForm,'disabled',false)
-                this.$set(this.optionContacts,'disabled',false)
-                this.optionForm.column.forEach(item=>{
-                    if(item.prop == 'remarks'  || item.prop == 'createTime' || item.prop == 'stockClerkId'){
-                        this.$set(item,'disabled',false)
-                    }else{
-                        this.$set(item,'disabled',true)
+                this.$set(this.optionForm, 'disabled', false)
+                this.$set(this.optionContacts, 'disabled', false)
+                this.optionForm.column.forEach(item => {
+                    if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
+                        this.$set(item, 'disabled', false)
+                    } else {
+                        this.$set(item, 'disabled', true)
 
                     }
                 })
-                this.optionContacts.column.forEach(item=>{
-                    if(item.prop == 'remarks'){
-                        this.$set(item,'disabled',false)
-                    }else{
-                        this.$set(item,'disabled',true)
+                this.optionContacts.column.forEach(item => {
+                    if (item.prop == 'remarks') {
+                        this.$set(item, 'disabled', false)
+                    } else {
+                        this.$set(item, 'disabled', true)
                     }
                 })
-            }else if(this.form.statusName == '已入库'){
-                this.$set(this.optionForm,'disabled',false)
-                this.$set(this.optionContactsBack,'disabled',false)
-                this.optionForm.column.forEach(item=>{
-                    if(item.prop == 'remarks'){
-                        this.$set(item,'disabled',false)
-                    }else{
-                        this.$set(item,'disabled',true)
+            } else if (this.form.statusName == '已入库') {
+                this.$set(this.optionForm, 'disabled', false)
+                this.$set(this.optionContactsBack, 'disabled', false)
+                this.optionForm.column.forEach(item => {
+                    if (item.prop == 'remarks') {
+                        this.$set(item, 'disabled', false)
+                    } else {
+                        this.$set(item, 'disabled', true)
 
                     }
                 })
-                this.optionContactsBack.column.forEach(item=>{
-                    if(item.prop == 'remarks'){
-                        this.$set(item,'disabled',false)
-                    }else{
-                        this.$set(item,'disabled',true)
+                this.optionContactsBack.column.forEach(item => {
+                    if (item.prop == 'remarks') {
+                        this.$set(item, 'disabled', false)
+                    } else {
+                        this.$set(item, 'disabled', true)
                     }
                 })
             }
@@ -716,7 +744,7 @@ export default {
                         spinner: 'el-icon-loading',
                         background: 'rgba(255,255,255,0.7)'
                     });
-                    this.form.customerName=this.form.$customerId
+                    this.form.customerName = this.form.$customerId
                     submit({
                         ...this.form,
                         bizTypeName: "SHGD"
@@ -747,10 +775,10 @@ export default {
             })
         },
         //编辑
-        rowEdit(row,index){
-            console.log(row,index);
+        rowEdit(row, index) {
+            console.log(row, index);
             this.confirmEditing()
-            this.$refs.formContacts.rowEdit(row,index)
+            this.$refs.formContacts.rowEdit(row, index)
         },
         rowDelBox(row, index) {
             this.$confirm("确定将选择数据删除?", {

+ 2 - 2
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -291,8 +291,8 @@ export default {
       this.onLoad(this.page, this.search)
     },
     rowCell(row,index){
-      // this.findObject(this.option.column, "storageName").cell = true
-      // this.findObject(this.optionList.column, "storageName").cell = true
+      this.findObject(this.option.column, "storageName").cell = true
+      this.findObject(this.optionList.column, "storageName").cell = true
       this.findObject(this.option.column, "stockClerkId").cell = true
       this.findObject(this.optionList.column, "stockClerkId").cell = true
       this.$refs.crud.rowCell(row, index)

+ 40 - 10
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -37,8 +37,7 @@
               </template>
               <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="$refs.formContacts.rowEdit(row, index)">编辑
+                  :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
                 </el-button>
                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
                   @click="rowDelBox(row, index)">删除
@@ -72,6 +71,7 @@
 import { getDetails, tradingBox, submit, warehousingComplete, revokeOutboundCompleted } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 import { dateFormat } from "@/util/date";
 import reportDialog from "@/components/report-dialog/main";
+import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 
 
 export default {
@@ -259,7 +259,14 @@ export default {
         }, {
           label: '批次号',
           prop: 'dot',
+          type: 'select',
           disabled: true,
+          dicData: [],
+          props: {
+            label: "dot",
+            value: "dot"
+          },
+          dicUrl: "/api/blade-sales-part/stockDesc/dotList",
 
         }, {
           label: '单位',
@@ -274,12 +281,12 @@ export default {
         }, {
           label: '出库数量',
           prop: 'goodsNum',
-          disabled:false,
+          disabled: false,
           disabled: true,
         }, {
           label: '实际数量',
           prop: 'sendNum',
-          disabled:false,
+          disabled: false,
         }, {
           label: '备注',
           prop: 'remarks'
@@ -385,6 +392,7 @@ export default {
       console.log(2);
       this.refresh(this.onLoad.id, true)
     }
+
   },
   methods: {
     // 撤销出库
@@ -411,6 +419,23 @@ export default {
         }
       })
     },
+    rowEdit(row, index) {
+      if(this.form.statusName == '待出库'){
+        this.optionContactsBack.column.forEach(its => {
+          if (its.prop == 'dot') {
+            this.$set(its, 'disabled', false)
+          }
+        })
+      }
+      console.log('this.formContacts.goodsId',this.formContacts.goodsId);
+      dotList({
+        storageId: this.form.storageId,
+        goodsId: row.goodsId
+      }).then(res => {
+        this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
+      })
+      this.$refs.formContacts.rowEdit(row,index)
+    },
     complete() {
       this.$refs["form"].validate((valid, done) => {
         done();
@@ -431,7 +456,7 @@ export default {
           }).finally(() => {
             loading.close();
           });
-        }else{
+        } else {
           this.$message.error('请选择')
         }
       })
@@ -481,8 +506,8 @@ export default {
         if (res.data.data.statusName == '已出库') {
           // this.$set(this.optionForm, 'disabled', true)
           this.isAddDisabled = true
-          this.optionContacts.column.forEach(item=>{
-            if(item.prop == 'sendNum'){
+          this.optionContacts.column.forEach(item => {
+            if (item.prop == 'sendNum') {
               item.disabled = true
             }
           })
@@ -528,18 +553,23 @@ export default {
     },
     //编辑
     confirmEditing() {
-      if (this.form.statusName == '待出库' ||this.form.statusName == '待入库') {
+      if (this.form.statusName == '待出库' || this.form.statusName == '待入库'||this.form.statusName == '撤销出库') {
         this.isDisabled = false
         this.$set(this.optionForm, 'disabled', false)
         this.optionForm.column.forEach(item => {
-          if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
+          if (item.prop == 'storageId' || item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
             item.disabled = false
           } else {
             item.disabled = true
           }
         })
         this.isAddDisabled = false
-      }else{
+        this.optionContactsBack.column.forEach(its => {
+          if (its.prop == 'dot') {
+            this.$set(its, 'disabled', false)
+          }
+        })
+      } else {
         this.$set(this.optionForm, 'disabled', false)
         this.optionForm.column.forEach(item => {
           if (item.prop == 'remarks') {

+ 49 - 15
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -70,6 +70,11 @@
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
                             </template>
+                            <!-- <template slot-scope="{scope,row}" slot="goodsNum">
+                                <el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
+                                    <template slot="inventory">{{ inventory }}吨</template>
+                                </el-input>
+                            </template> -->
                             <!-- <template slot="goodsId" slot-scope="{ row, index }">
                                 <span  style="display:flex">
                                     <el-select v-model="row.goodsId" placeholder="请选择" size="small" filterable
@@ -112,7 +117,7 @@
                             :data="form.outboundRecordsList" @row-save="rowSave" @row-update="rowUpdate"
                             @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)"
                             @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)">
-                            <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+                            <!-- <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button :size="size" :disabled="disabled" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
                                     @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
@@ -120,7 +125,7 @@
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
                                     @click="rowDelBox(row, index)">删除
                                 </el-button>
-                            </template>
+                            </template> -->
                         </avue-crud>
                     </el-tab-pane>
                 </el-tabs>
@@ -156,6 +161,7 @@ export default {
 
     data() {
         return {
+            inventory: 0,
             goodsIdoptions: [],
             dataList: [],
             dicUrlWithCustomId: '',
@@ -211,7 +217,7 @@ export default {
                                 this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
                                 // this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
                                 // this.form.storageId = res.data.data.deliveryWarehouseId
-                                this.form.storageId = this.form.storageId ?this.form.storageId :res.data.data.deliveryWarehouseId
+                                this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
                                 this.form.contacts = res.data.data.corpsAttnList[0].cname
                                 this.form.phone = res.data.data.corpsAttnList[0].tel
                                 this.contactsOption = res.data.data.corpsAddrList
@@ -445,8 +451,18 @@ export default {
                         required: true,
                         message: " ",
                         trigger: "blur"
-                    }]
-                }, {
+                    },{
+                        validator: (rule, value, callback) => {
+                            if (value < 0) {
+                                callback(new Error("数量不能小于0"));
+                            } else {
+                                callback();
+                            }
+                        },
+                        trigger: "blur"
+                }]
+                },
+                {
                     label: '价格',
                     prop: 'price',
                     overHidden: true,
@@ -456,8 +472,24 @@ export default {
                         required: true,
                         message: " ",
                         trigger: "blur"
-                    }]
-                }, {
+                    },{
+                        validator: (rule, value, callback) => {
+                            if (value < 0) {
+                                callback(new Error("价格不能小于0"));
+                            } else {
+                                callback();
+                            }
+                        },
+                        trigger: "blur"
+                }]
+                }, 
+                {
+                    label: '库存',
+                    prop: 'inventory',
+                    overHidden: true,
+                    hide: true,
+                    width: 100
+                },{
                     label: '批次号',
                     prop: 'dot',
                     type: "select",
@@ -589,6 +621,7 @@ export default {
                 align: 'center',
                 index: true,
                 addBtnText: "录入明细",
+                menu:false,
                 refreshBtn: false,
                 dialogDrag: true,
                 addBtn: false,
@@ -618,6 +651,7 @@ export default {
             optionOutboundRecordsBack: {
                 align: 'center',
                 index: true,
+                menu:false,
                 addBtnText: "录入明细",
                 refreshBtn: false,
                 dialogDrag: true,
@@ -627,7 +661,7 @@ export default {
                 addRowBtn: false,
                 editBtn: false,
                 delBtn: false,
-                menuWidth: 140,
+                // menuWidth: 140,
                 dialogTop: 25,
                 dialogWidth: "80%",
                 column: [{
@@ -665,7 +699,7 @@ export default {
                 goodsDetail({ id: value, customId: this.dicUrlWithCustomId }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
-
+                    this.formContacts.inventory = res.data.data.inventory
                     // this.formContacts.brandId = res.data.data.brandName
                     // this.formContacts.brandName = res.data.data.brandId
 
@@ -698,7 +732,7 @@ export default {
                 goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
-
+                    this.formContacts.inventory = res.data.data.inventory
                     // this.formContacts.brandId = res.data.data.brandName
                     // this.formContacts.brandName = res.data.data.brandId
 
@@ -739,7 +773,7 @@ export default {
             console.log(3);
             this.optionContactsBack.column.forEach(its => {
                 if (its.prop == 'goodsId' || its.prop == 'goodsNum' || its.prop == 'price' || its.prop == 'dot' || its.prop == 'remarks') {
-                    its.disabled = false 
+                    its.disabled = false
                 } else {
                     its.disabled = true
                 }
@@ -816,7 +850,7 @@ export default {
         //表头编辑
         confirmEditing() {
             this.isAddBtn = false
-            if (this.form.status == '已取消'  || this.form.status == '退款请核') {
+            if (this.form.status == '已取消' || this.form.status == '退款请核') {
                 this.isAddBtn = true
                 // this.$message.error('当前状态不允许编辑')
                 // this.optionForm.column.forEach(item=>{
@@ -860,7 +894,7 @@ export default {
                         }
                     })
                     loadings.close()
-                }else{
+                } else {
                     const loadin = this.$loading({
                         lock: true,
                         text: '加载中',
@@ -1009,7 +1043,7 @@ export default {
                                 }).finally(() => {
                                     loading.close();
                                 });
-                            }else{
+                            } else {
                                 this.$message.error('请选择仓库')
                             }
                         })
@@ -1141,7 +1175,7 @@ export default {
                 if (this.form.status == '退款请核' || this.form.status == '退款中') {
                     this.isRevocationRequest = false;
                 }
-                if (this.form.status == '已收货' ||this.form.status == '已发货') {
+                if (this.form.status == '已收货' || this.form.status == '已发货') {
                     this.isDisabledTask = true;
                 }
                 //成本、毛利对销售角色隐藏

+ 1 - 1
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -13,7 +13,7 @@
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新</el-button>
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
           <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
         </template>
         <template slot-scope="{ row, index }" slot="ordNo">