Jelajahi Sumber

Merge branch 'feature/Feature-basic_data' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-basic_data

chen 3 tahun lalu
induk
melakukan
ca47906cb3

+ 4 - 2
src/api/basic_data/material.js

@@ -267,7 +267,7 @@ export function getProductCategoryKingDeeCategoryList() {
   return request({
     url:'/product-category/king-dee-category-list',
     method: 'get',
-    
+
   })
 }
 //新增产品品类小类
@@ -278,6 +278,7 @@ export function getProductCategoryAddSub(data) {
     data
   })
 }
+
 //删除产品品类小类
 export function getProductCategoryDelSub(params) {
   return request({
@@ -285,4 +286,5 @@ export function getProductCategoryDelSub(params) {
     method: 'post',
     params
   })
-}
+}
+

+ 2 - 2
src/views/basic_data/material/category_list.vue

@@ -105,7 +105,7 @@
               prop="updateTime"
               min-width="100"
             ></el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="center"
               label="审核人"
               prop="examine"
@@ -128,7 +128,7 @@
               label="禁用日期"
               prop="disableDate"
               min-width="100"
-            ></el-table-column>
+            ></el-table-column> -->
           </el-table>
         </div>
        <!-- 分页 -->

+ 91 - 49
src/views/basic_data/material/components/modify_list-apply.vue

@@ -35,7 +35,18 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="调价部门">
-              <el-input placeholder="请输入" disabled></el-input>
+              <el-select
+                placeholder="请选择销售类型"
+                filterable
+                disabled
+                v-model="saleTypeIds"
+              >
+                <el-option
+                  v-for="item in typeList"
+                  :label="item.saleName"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -57,11 +68,15 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="销售类型">
-              <el-select placeholder="请选择销售类型" v-model="saleTypeId">
+              <el-select
+                placeholder="请选择销售类型"
+                filterable
+                v-model="saleTypeId"
+              >
                 <el-option
                   v-for="item in typeList"
-                  :label="item.name"
-                  :value="item.name"
+                  :label="item.saleName"
+                  :value="item.id"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -119,11 +134,12 @@
                 <el-form-item>
                   <el-select
                     placeholder="请选择销售类型"
+                    filterable
                     v-model="scope.row.saleTypeId"
                   >
                     <el-option
                       v-for="item in typeList"
-                      :label="item.name"
+                      :label="item.saleName"
                       :value="item.id"
                     ></el-option>
                   </el-select>
@@ -265,7 +281,7 @@
                 <el-form-item>
                   <el-select
                     v-model="scope.row.isPromote"
-                    @change="hanleChange"
+
                     placeholder="请选择是否促销价"
                   >
                     <el-option
@@ -300,15 +316,15 @@
               ><template slot-scope="scope">
                 <el-form-item>
                   <el-select
-                    v-model="scope.row.isPublish"
-                    @change="hanleChange"
+                    v-model="scope.row.walletsId"
+                    @change="handelWallets($event,scope.$index)"
                     placeholder="请选择现金钱包"
                   >
                     <el-option
                       v-for="item in scope.row.rebateList"
-                      :key="item.bool"
-                      :value="item.bool"
-                      :label="item.value"
+                      :key="item.walletRebateId"
+                      :value="item.walletRebateId"
+                      :label="item.name"
                     >
                     </el-option>
                   </el-select>
@@ -325,7 +341,7 @@
                 <el-form-item>
                   <el-select
                     v-model="scope.row.isPublish"
-                    @change="hanleChange"
+
                     placeholder="请选择是否发布"
                   >
                     <el-option
@@ -525,7 +541,7 @@
                 <el-form-item>
                   <el-select
                     v-model="scope.row.isPromote"
-                    @change="hanleChange"
+
                     placeholder="请选择是否促销价"
                   >
                     <el-option
@@ -558,17 +574,18 @@
               min-width="160"
               show-overflow-tooltip
               ><template slot-scope="scope">
+
                 <el-form-item>
                   <el-select
                     v-model="scope.row.isPublish"
-                    @change="hanleChange"
+
                     placeholder="请选择支付钱包类型"
                   >
                     <el-option
                       v-for="item in scope.row.rebateList"
-                      :key="item.bool"
-                      :value="item.bool"
-                      :label="item.value"
+                      :key="item.walletRebateId"
+                      :value="item.walletRebateId"
+                      :label="item.name"
                     >
                     </el-option>
                   </el-select>
@@ -585,7 +602,7 @@
                 <el-form-item>
                   <el-select
                     v-model="scope.row.isPublish"
-                    @change="hanleChange"
+
                     placeholder="请选择是否发布"
                   >
                     <el-option
@@ -636,7 +653,7 @@
       </div>
     </div>
     <div class="btn-group clearfix">
-      <el-button size="small">重置</el-button>
+      <el-button size="small"  @click="handleReseat">重置</el-button>
       <el-button size="small" type="primary" @click="hanleSbumit"
         >提交</el-button
       >
@@ -654,18 +671,13 @@
 <script>
 import {
   getProductRriceAdd,
-  getProductRriceConfirm,
   getProductRriceDetail,
-  getProductRriceEdit,
-  getProductRriceList,
-  getProductRriceRevoke,
-  getProductRriceSubmit,
   getTypeList,
-  // getTree,
   getMaterialList,
   getRebate,
+  getTree
 } from "@/api/basic_data/material";
-import { thisTypeAnnotation } from "@babel/types";
+
 export default {
   data() {
     return {
@@ -700,18 +712,30 @@ export default {
   mounted() {
     let params = {
       pageNum: 1,
-      pageSize: 10,
+      pageSize: -1,
       saleCode: "",
       saleName: "",
-      status: 1,
+      status: "",
     };
     getTypeList(params).then((res) => {
       this.typeList = res.data.records;
     });
+    getTree().then(res=>{
+      console.log(res,'bumeng');
+    })
   },
   methods: {
-    hanleChange(e) {
-      console.log(e);
+    handelWallets(e,index){
+      // console.log(e, 'hao' ,index);
+      this.items[index].wallets = [
+          {
+            billId: "",
+            id: "",
+            mainId: "",
+            parentId: "",
+            parentItemId: e,
+          },
+        ]
     },
     goBack() {
       this.$parent.show = 1;
@@ -733,6 +757,7 @@ export default {
       };
       getRebate(rebateParams).then((res) => {
         this.rebateList = res.data.records;
+        console.log(this.rebateList,'this.rebateList');
       });
       let params = {
         pageNum: 1,
@@ -744,8 +769,8 @@ export default {
       });
     },
     hanleAdd() {
-      this.centerDialogVisible = false;
-      this.items.push({
+      if (this.materialId) {
+          this.items.push({
         baseUnitId: "",
         batchPrice: "",
         billId: "",
@@ -764,15 +789,9 @@ export default {
         specification: "",
         startDate: "",
         wallets: [
-          {
-            billId: "44",
-            id: "",
-            mainId: "",
-            parentId: "",
-            parentItemId: "",
-          },
+
         ],
-        rebateList: this.rebateList,
+        rebateList: [...this.rebateList],
         isPublishArr: [
           {
             value: "是",
@@ -794,8 +813,14 @@ export default {
           },
         ],
       });
+      this.centerDialogVisible = false;
+      }else{
+        this.$errorMsg('请选择产品')
+      }
+
     },
     hanleSbumit() {
+
       const params = {
         ...this.base,
         items: this.items,
@@ -842,17 +867,17 @@ export default {
           ],
         };
         this.base = {
-          adminCompanyId: "5454",
-          adminWebsitId: "345",
-          billId: "34324",
-          examineNote: "234",
+          adminCompanyId: "",
+          adminWebsitId: "",
+          billId: "",
+          examineNote: "",
           examineResult: true,
-          examineStatus: "2342",
+          examineStatus: "",
           id: null,
-          operatorId: "234",
-          operatorName: "3223",
-          remark: "2332",
-          saleTypeId: "2332",
+          operatorId: "",
+          operatorName: "",
+          remark: "",
+          saleTypeId: "",
         };
 
         getProductRriceDetail({ id: res.data }).then((res) => {
@@ -864,6 +889,23 @@ export default {
         });
       });
     },
+    handleReseat(){
+        this.base= {
+        adminCompanyId: "",
+        adminWebsitId: "",
+        billId: "",
+        examineNote: "",
+        examineResult: true,
+        examineStatus: "",
+        id: null,
+        operatorId: "",
+        operatorName: "",
+        remark: "",
+        saleTypeId: "",
+      }
+      this.saleTypeId = ''
+       this.items= []
+    }
   },
 };
 </script>

+ 19 - 100
src/views/basic_data/material/machine_list.vue

@@ -71,6 +71,7 @@
           cancel-button-text="不用了"
           icon="el-icon-info"
           icon-color="red"
+          :show-file-list="false"
           title="内容确定删除吗?"
           @onConfirm="hanleDeleteAll"
         >
@@ -84,21 +85,24 @@
         </el-popconfirm>
       </div>
       <div class="fr">
-        <el-upload
-          class="import-btn"
+
+
+        <!-- <el-upload
+          class="import-btn upload-demo"
           :action="baseURL + 'student/import'"
           :http-request="handleImport"
           :file-list="importFileList"
+          :show-file-list="false"
         >
           <el-button type="primary" size="small">导入</el-button>
-        </el-upload>
+        </el-upload> -->
         <el-button type="primary" size="small" @click="handleExport"
           >导出</el-button
         >
-        <el-button type="primary" size="small">打印</el-button>
+        <el-button  type="primary" size="small" icon="el-icon-printer" v-print="printObj">打 印</el-button>
       </div>
     </div>
-    <div class="mymain-container">
+    <div class="mymain-container" id="printMe">
       <!-- 列表 -->
       <div class="table">
         <el-table
@@ -282,13 +286,19 @@ import {
   getMachineDel,
   getMachineEdit,
   getDistList,
-  getMaterialList,
 } from "@/api/basic_data/material";
 import { number } from "yargs";
+import print from 'vue-print-nb'
 export default {
   mixins: [Mixin],
+    directives: {
+    print
+  },
   data() {
     return {
+       printObj: {
+        id: 'printMe'
+      },
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -324,86 +334,7 @@ export default {
       },
       showDialogForm: false,
       dataList: [
-        {
-          name: "新风机XXX内机",
-          number: "DSAFSAF232312321",
-          code: "DSAFSAF232312321",
-          volume: "23M^3",
-          outName: "新风机XXX外机",
-          outNumber: "DSAFSAF232312321",
-          updateUser: "DSAFSAF232312321",
-          outVolume: "23M^3",
-          partsOne: "",
-          partsTwo: "",
-          create: "LID",
-          createDate: "2022-09-12 12:21",
-          update: "LID",
-          updateDate: "2022-09-12 12:21",
-        },
-        {
-          name: "新风机XXX内机",
-          number: "DSAFSAF232312321",
-          code: "DSAFSAF232312321",
-          volume: "23M^3",
-          outName: "新风机XXX外机",
-          outNumber: "DSAFSAF232312321",
-          updateUser: "DSAFSAF232312321",
-          outVolume: "23M^3",
-          partsOne: "",
-          partsTwo: "",
-          create: "LID",
-          createDate: "2022-09-12 12:21",
-          update: "LID",
-          updateDate: "2022-09-12 12:21",
-        },
-        {
-          name: "新风机XXX内机",
-          number: "DSAFSAF232312321",
-          code: "DSAFSAF232312321",
-          volume: "23M^3",
-          outName: "新风机XXX外机",
-          outNumber: "DSAFSAF232312321",
-          updateUser: "DSAFSAF232312321",
-          outVolume: "23M^3",
-          partsOne: "",
-          partsTwo: "",
-          create: "LID",
-          createDate: "2022-09-12 12:21",
-          update: "LID",
-          updateDate: "2022-09-12 12:21",
-        },
-        {
-          name: "新风机XXX内机",
-          number: "DSAFSAF232312321",
-          code: "DSAFSAF232312321",
-          volume: "23M^3",
-          outName: "新风机XXX外机",
-          outNumber: "DSAFSAF232312321",
-          updateUser: "DSAFSAF232312321",
-          outVolume: "23M^3",
-          partsOne: "",
-          partsTwo: "",
-          create: "LID",
-          createDate: "2022-09-12 12:21",
-          update: "LID",
-          updateDate: "2022-09-12 12:21",
-        },
-        {
-          name: "新风机XXX内机",
-          number: "DSAFSAF232312321",
-          code: "DSAFSAF232312321",
-          volume: "23M^3",
-          outName: "新风机XXX外机",
-          outNumber: "DSAFSAF232312321",
-          updateUser: "DSAFSAF232312321",
-          outVolume: "23M^3",
-          partsOne: "",
-          partsTwo: "",
-          create: "LID",
-          createDate: "2022-09-12 12:21",
-          update: "LID",
-          updateDate: "2022-09-12 12:21",
-        },
+
       ],
       searchForm: {
         name: "",
@@ -412,20 +343,8 @@ export default {
         volume: "",
       },
       type: null,
-      // rules: {
-      //     name: [
-      //       {  message: '请输入名称', trigger: 'blur' },
-      //     ],
-      //     number:[
-      //          {  message: '请输入编码',type:'number', trigger: 'blur' },
-      //     ],
-      //      type:[
-      //          {  message: '请输入型号',type:'number', trigger: 'blur' },
-      //     ],
-      //     volume:[
-      //       {  message: '请输入体积',type:'string', trigger: 'blur' },
-      //     ]
-      // }
+      distList:[]
+
     };
   },
   methods: {

+ 355 - 241
src/views/basic_data/warehouse/components/warehouse_list-detail.vue

@@ -1,245 +1,352 @@
 <template>
   <div>
-    <div class="sty">
-      <el-page-header @back="goBack" content="详情页面"> </el-page-header>
-    </div>
-    <el-card class="box-card">
-      <div slot="header" class="clearfix">
-        <span>组织信息</span>
+    <el-form label-width="120px" :inline="false" size="small" label-position="left">
+      <div class="sty">
+        <el-page-header @back="goBack" content="详情页面"> </el-page-header>
       </div>
-      <el-row>
-        <el-col :span="8"
-          ><span>创建组织</span
-          ><input type="text" v-model="detail.createOrgName"
-        /></el-col>
-        <el-col :span="8"
-          ><span>编码</span><input type="text" v-model="detail.useOrgNumber"
-        /></el-col>
-        <el-col :span="8"
-          ><span>名称</span><input type="text" v-model="detail.name"
-        /></el-col>
-      </el-row>
-    </el-card>
-    <el-card class="box-card">
-      <div slot="header" class="clearfix">
-        <span>基本信息</span>
-      </div>
-      <div class="baseInfo">
-        <div>
-          <div class="base-header">
-            <span>基本信息</span>
-          </div>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">仓库属性</span>
-              <!-- <select name="" id="" class="selectStyle2">
-                <option value="">普通仓库</option>
-              </select>
-               -->
-              <input type="text" v-model="detail.stockProperty" />
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">供应商</span
-              ><input v-model="detail.supplierName" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">客户</span
-              ><textarea
-                v-model="detail.customerName"
-                name=""
-                id=""
-                cols="30"
-                rows="10"
-                class="textareaStyle"
-              ></textarea>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">仓库地址</span
-              ><textarea
-                v-model="detail.address"
-                class="textareaStyle"
-                name=""
-                id=""
-                cols="30"
-                rows="10"
-              ></textarea>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">仓库负责人</span
-              ><input v-model="detail.principalName" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">联系电话</span
-              ><input type="text" v-model="detail.tel" />
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">描述</span
-              ><textarea
-                v-model="detail.description"
-                class="textareaStyle"
-                name=""
-                id=""
-                cols="30"
-                rows="10"
-              ></textarea>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">分组</span
-              ><input v-model="detail.groupName" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">管易仓</span
-              ><input v-model="detail.gysStock" type="checkbox"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">管易仓编码</span
-              ><input v-model="detail.gysStockNumber" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">第三方仓储类型</span>
-              <input type="text" v-model="detail.thirdStockType" />
-              <!-- <select name="" id="" class="selectStyle2">
-                <option value="">正常</option>
-              </select> -->
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">第三方仓库编码</span
-              ><input v-model="detail.thirdStockNo" type="text"
-            /></el-col>
-          </el-row>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span>组织信息</span>
         </div>
-        <div>
-          <div class="base-header">
-            <span>库存状态</span>
-          </div>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">库存状态类型</span>
-              <input type="text" v-model="stockStatusType" />
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="创建组织" size="small">
+              <el-input
+                v-model="detail.createOrgName"
+                :readonly="isReadonly"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="编码" size="small">
+              <el-input
+                v-model="detail.useOrgNumber"
+                :readonly="isReadonly"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="名称" size="small">
+              <el-input v-model="detail.name" :readonly="isReadonly" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-card>
+      <el-card class="box-card">
+        <div slot="header" class="clearfix">
+          <span>基本信息</span>
+        </div>
+        <div class="baseInfo">
+          <el-row :gutter="40">
+            <el-col :span="12" :offset="0">
+              <div>
+                <div class="base-header">
+                  <span>基本信息</span>
+                </div>
+                <el-row>
+                  <el-col :span="24"
+                    ><span class="marg-r"></span>
+
+                    <el-form-item label="仓库属性" size="small">
+                      <el-input
+                        v-model="detail.stockProperty"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="供应商" size="small">
+                      <el-input
+                        v-model="detail.supplierName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24">
+                    <el-form-item label="客户" size="small">
+                      <el-input
+                        v-model="detail.customerName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+
+                    <el-form-item label="仓库地址" size="small">
+                      <el-input
+                        v-model="detail.address"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+
+                       <el-form-item label="仓库负责人" size="small">
+                      <el-input
+                        v-model="detail.principalName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                     <el-form-item label="联系电话" size="small">
+                      <el-input
+                        v-model="detail.tel"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+
+                           <el-form-item label="描述" size="small">
+                      <el-input
+                        v-model="detail.description"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                     <el-form-item label="分组" size="small">
+                      <el-input
+                        v-model="detail.groupName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                   </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                       <el-form-item label="管易仓" size="small">
+                      <el-input
+                        :value="detail.gysStock?'是':'否'"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                         <el-form-item label="管易仓编码" size="small">
+                      <el-input
+                        v-model="detail.gysStockNumber"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                      <el-form-item label="第三方仓储类型" size="small">
+                      <el-input
+                        v-model="detail.thirdStockType"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+
+                        <el-form-item label="第三方仓库编码" size="small">
+                      <el-input
+                        v-model="detail.thirdStockNo"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                    </el-col>
+                </el-row>
+              </div>
             </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">默认库存状态</span
-              ><input v-model="detail.defStockStatusName" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">默认收料状态</span
-              ><input v-model="detail.defReceiveStatusName" type="text"
-            /></el-col>
-          </el-row>
-          <div class="base-header">
-            <span>控制</span>
-          </div>
-          <el-row>
-            <el-row>
-              <el-col :span="24"
-                ><span class="marg-r">允许客户查询</span><input type="checkbox"
-              /></el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8"
-                ><span class="marg-r">允许即时库存负库存</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.allowMinusQty !== 'false' ? false : true"
-              /></el-col>
-              <el-col :span="8"
-                ><span class="marg-r">允许MRP计划</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.allowMrpPlan !== 'false' ? false : true"
-              /></el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8"
-                ><span class="marg-r">允许锁库</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.allowLock !== 'false' ? false : true"
-              /></el-col>
-              <el-col :span="8"
-                ><span class="marg-r">参与预警</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.availableAlert !== 'false' ? false : true"
-              /></el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8"
-                ><span class="marg-r">启用仓位管理</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.openLocation !== 'false' ? false : true"
-              /></el-col>
-              <el-col :span="8"
-                ><span class="marg-r">参与拣货</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.availablePicking !== 'false' ? false : true"
-              /></el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="8"
-                ><span class="marg-r">不参与可发量统计</span
-                ><input
-                  type="checkbox"
-                  :checked="detail.notExpQty !== 'false' ? false : true"
-              /></el-col>
-              <el-col :span="8"> </el-col>
-            </el-row>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">拣货优先级(1~9999)</span
-              ><input v-model="detail.sortingPriority" type="text"
-            /></el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24"
-              ><span class="marg-r color">仓位维度数据列表显示格式</span>
-              <input type="text" v-model="detail.loclistFormatter" />
+            <el-col :span="12" :offset="0">
+              <div>
+                <div class="base-header">
+                  <span>库存状态</span>
+                </div>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                      <el-form-item label="库存状态类型" size="small">
+                      <el-input
+                        v-model="stockStatusType"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                       <el-form-item label="默认库存状态" size="small">
+                      <el-input
+                        v-model="detail.defStockStatusName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                    </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+
+                        <el-form-item label="默认收料状态" size="small">
+                      <el-input
+                        v-model="detail.defReceiveStatusName"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+
+                    </el-col>
+                </el-row>
+                <div class="base-header">
+                  <span>控制</span>
+                </div>
+                <el-row>
+
+                  <el-row>
+                       <el-col :span="12"
+                      >
+                    <el-form-item label="允许客户查询" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.allowMinusQty" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+
+                     </el-col>
+                    <el-col :span="12"
+                      >
+                    <el-form-item label="允许即时库存负库存" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.allowMinusQty" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+                     </el-col>
+                    <el-col :span="12"
+                      >
+                        <el-form-item label="允许MRP计划" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.allowMrpPlan" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+                     </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="12"
+                      >
+                           <el-form-item label="允许锁库" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.allowLock" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+                     </el-col>
+                    <el-col :span="12"
+                      >
+                            <el-form-item label="参与预警" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.availableAlert" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+                     </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="12"
+                      >
+                           <el-form-item label="启用仓位管理" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.openLocation" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+
+                      </el-col>
+                    <el-col :span="12"
+                      >
+                          <el-form-item label="参与拣货" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.availablePicking" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+
+                      </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="12"
+                      >
+                         <el-form-item label="不参与可发量统计" size="small">
+                        <el-radio :readonly="isReadonly" v-model="detail.notExpQty" :label="true">{{''}}</el-radio>
+                    </el-form-item>
+
+                      </el-col>
+                    <el-col :span="12"> </el-col>
+                  </el-row>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                        <el-form-item label="拣货优先级(1~9999)" size="small">
+                      <el-input
+                        v-model="detail.sortingPriority"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="24"
+                    >
+                      <el-form-item label="仓位维度数据列表显示格式" size="small">
+                      <el-input
+                        v-model="detail.loclistFormatter"
+                        :readonly="isReadonly"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+
+              </div>
             </el-col>
           </el-row>
-          <!-- <div class="base-header">
-            <span>状态</span>
-          </div> -->
-          <!-- <el-row>
-            <el-col :span="24"
-              ><span class="marg-r">数据状态</span
-              ><select name="" id="" class="selectStyle2">
-                <option value="">暂存</option>
-              </select></el-col
-            >
-          </el-row> -->
         </div>
-        <div></div>
-      </div>
-    </el-card>
+      </el-card>
+    </el-form>
   </div>
 </template>
 
@@ -251,6 +358,7 @@ export default {
     detail: {
       type: Object,
       default: {},
+      isReadonly:true
     },
   },
   computed: {
@@ -302,6 +410,12 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.flex {
+  display: flex;
+  div {
+    width: 120px;
+  }
+}
 .baseWidth {
   width: 46%;
 }
@@ -357,13 +471,13 @@ export default {
     width: 100px;
   }
 }
-.baseInfo {
-  display: flex;
-  justify-content: space-between;
-  > div {
-    width: 33%;
-  }
-}
+// .baseInfo {
+//   display: flex;
+//   justify-content: space-between;
+//   > div {
+//     width: 33%;
+//   }
+// }
 .sty {
   margin-bottom: 20px;
 }

+ 11 - 34
src/views/basic_data/warehouse/warehouse_site.vue

@@ -41,8 +41,8 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small" @click="newData">新增</el-button>
-        <!-- <el-button type="primary" size="small" @click="showDialogForm = true,type=2">编辑</el-button> -->
+        <el-button type="primary" size="small" @click="newData(),type=1">新增</el-button>
+
         <el-button type="primary" size="small">删除</el-button>
       </div>
     </div>
@@ -76,13 +76,13 @@
             align="center"
             label="仓位名称"
             prop="kingDeeStocks"
-            min-width="300"
-            :formatter="formDatas"
+            min-width="400"
+
             show-overflow-tooltip
           >
             <template slot-scope="scope">
               <template v-if="scope.row.kingDeeStocks.length > 1">
-                <el-tag type="danger" v-for="item in scope.row.kingDeeStocks">
+                <el-tag type="danger"  style="margin-right: 10px;" v-for="item in scope.row.kingDeeStocks">
                   {{ item.name }}
                 </el-tag>
               </template>
@@ -153,7 +153,7 @@
               <el-button
                 type="text"
                 class="textColor"
-                @click="editFn(scope.row.id, scope.row)"
+                @click="editFn(scope.row.id, scope.row),type = 2"
                 >编辑</el-button
               >
               <el-popconfirm
@@ -305,9 +305,7 @@ export default {
     };
   },
   methods: {
-    addFn() {
-      this.showDialogForm = true;
-    },
+
     newData() {
       this.showDialogForm = true;
       this.type = 1;
@@ -323,10 +321,8 @@ export default {
     },
     //显示编辑,编辑数据初始化
     editFn(id, row) {
-      console.log(row);
       this.type = 2;
       const arr = []
-
        if (row.kingDeeStocks.length>1) {
          row.kingDeeStocks.forEach(el => {
            arr.push(el.id)
@@ -341,42 +337,23 @@ export default {
         stockCordon: row.stockCordon,
         stockIds: row.stockIds === undefined ? arr: row.stockIds,
       };
-
-
-
-
       this.showDialogForm = true;
     },
-    formDatas(row) {
-      console.log(row.kingDeeStocks);
-      let str = "";
-      //       row.kingDeeStocks.forEach(item => {
-      //           str+= item.name
-      //       });
-      // return str
-      // let a = (row && row.kingDeeStocks) || []
-      // let arr = []
-      // console.log(a);
-      //   a.forEach(item => {
 
-      //       arr.push(item)
-      //   });
-      //   return arr.join(',')
-    },
     hanleInfo() {
-      if (this.type === 1) {
+      console.log(this.type);
+      if (this.type == 1) {
         addStock(this.diaLogForm).then((res) => {
           this.$successMsg("保存成功");
           this.showDialogForm = false;
           this.getList();
         });
-      } else {
+      } else if(this.type ==2) {
         const params = {
           ...this.diaLogForm,
         };
-        console.log(params, 123);
         updateStock(params).then((res) => {
-          this.$successMsg("保存成功");
+          this.$successMsg("编辑成功");
           this.showDialogForm = false;
           this.getList();
         });

+ 17 - 2
src/views/sales_policy/components/AddCondition.vue

@@ -75,12 +75,25 @@
             <el-row>
               <el-form-item label="配置比例设置"> </el-form-item>
             </el-row>
+       <el-col
+              :xs="24"
+              :sm="8"
+              :lg="8"
+
+            >
+              <el-form-item label="限定机型">
+                <el-input
+                  size="small"
+                  v-model="limit"
+                ></el-input>
+              </el-form-item>
+              </el-col>
 
             <el-col
               :xs="24"
               :sm="8"
               :lg="8"
-              v-for="(len, index) in conditionBox"
+              v-for="(len, index) in conditionBox.length-1"
             >
               <el-form-item :label="'配提' + (index + 1) + '比例'">
                 <el-input
@@ -164,6 +177,7 @@
     <el-dialog :visible.sync="VisibleModle" width="70%" center>
       <div>
         <el-container>
+
           <el-header height="">
             <el-form label-width="0" :inline="false" size="small">
               <el-col :xs="24" :sm="8" :lg="8" :offset="0">
@@ -480,11 +494,12 @@ export default {
         this.$errorMsg("请选择机型");
         return;
       }
-      var pop = [];
+      var pop = [this.limit];
       for (const key in this.popArr) {
 
         pop.push(this.popArr[key]);
       }
+      console.log(pop.join(":"));
       const params = {
         id: "",
         policyConditionMaterials: tableData,

+ 21 - 20
src/views/sales_policy/components/AddPolicy.vue

@@ -1,5 +1,6 @@
 <template>
   <div>
+    <div>
     <el-header height="50px" class="header">
       <el-page-header
         @back="($parent.isShow = 1), ($parent.isFlag = '')"
@@ -56,7 +57,7 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :ms="12" :lg="12">
-              <el-form-item label="支付钱包类型" prop="name">
+              <el-form-item label="产品品类" prop="name">
                 <el-select v-model="value" placeholder="请选择">
                   <el-option
                     v-for="(item, index) in walletList"
@@ -119,6 +120,7 @@
                 :action="baseURL + 'student/import'"
                 :http-request="handleImport"
                 :file-list="importFileList"
+                :show-file-list="false"
               >
                 <el-button size="small">导入货品价格表</el-button>
               </el-upload>
@@ -169,7 +171,7 @@
           </el-table-column>
           <el-table-column label="支付钱包" align="center">
             <template slot-scope="scope">
-                <el-tag type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
+                <el-tag style="margin:10px" type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
             </template>
           </el-table-column>
           <el-table-column fixed="right" label="操作" align="center">
@@ -213,7 +215,7 @@
                 条件信息
               </h4>
               <el-button size="small" @click="$parent.isShow = 3"
-                >管理条件</el-button
+                >添加</el-button
               ></el-col
             >
           </el-row>
@@ -237,6 +239,9 @@
           >
           </el-table-column>
           <el-table-column prop="name" label="限定条件" align="center">
+            <template slot-scope="scope">
+              限定条件{{scope.$index+1}}
+            </template>
           </el-table-column>
           <el-table-column
             fixed="right"
@@ -245,7 +250,7 @@
             align="center"
           >
             <template slot-scope="scope">
-              <el-button type="text" size="small">删除</el-button>
+              <el-button type="text" size="small" @click="handleCondition(scope.row.id,scope.$index)">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -264,6 +269,8 @@
       </div>
     </div>
   </div>
+  <AddCondition  />
+  </div>
 </template>
 
 <script>
@@ -274,6 +281,7 @@ import {
   getTypeList,
   getWalletList,
   getMaterialList,
+  deleteCondition,
   getConditionList,
   deleteMaterialPolicy,
 } from "@/api/supply/sales";
@@ -335,7 +343,6 @@ export default {
     },
   }),
   created() {
-
     this.getCommonApi();
     if (this.$parent.isFlag) {
       const params = {
@@ -344,7 +351,7 @@ export default {
       // 获取条件政策
       getConditionList(params).then((res) => {
         this.conditionList = res.data;
-        console.log(res.data, "jsfdkljslkj");
+
       });
       // this.handletwoList()
     }
@@ -360,6 +367,12 @@ export default {
     hanleDownloadFiles() {
       downloadFiles("/policy/download");
     },
+    handleCondition(id,index){
+      deleteCondition({id}).then(res=>{
+            this.conditionList.splice(index,1)
+        this.$successMsg('删除成功')
+      })
+    },
     getCommonApi() {
       // this.handletwoList()
       const params = {
@@ -443,22 +456,10 @@ export default {
       console.log(policyCustomers, "选择的经销商");
       if (policyCustomers.length) {
         var arr = [];
-        var arr = [
-          {
-            customerId: "",
-            customerName: "",
-            customerNumber: "",
-            id: "",
-            lastOrderTime: "",
-            limitTakeNum: 0,
-            policyId: "",
-            policyTitle: "",
-            remark: "",
-          },
-        ];
+
         policyCustomers.forEach((el) => {
           arr.push({
-            customerId: "",
+            customerId: el.id,
             customerName: el.name,
             customerNumber: el.number,
             lastOrderTime: "",

+ 7 - 9
src/views/sales_policy/components/Transfer.vue

@@ -3,7 +3,7 @@
     <slot name="header">
       <el-row class="radio">
         <el-radio-group v-model="region">
-          <el-radio label="0">全部经销商</el-radio>
+          <el-radio label="">全部经销商</el-radio>
           <el-radio label="1">地区</el-radio>
           <el-radio label="2">指定</el-radio>
         </el-radio-group>
@@ -127,7 +127,7 @@ export default {
   data() {
     return {
       type: "",
-      radio: "0",
+      radio: "",
       leftData: [],
       dataL: [],
       dataR: [],
@@ -139,8 +139,7 @@ export default {
         },
       ],
       value: "",
-     region: "",
-
+      region: "",
       keyword: "",
     };
   },
@@ -152,15 +151,13 @@ export default {
       const customerParams = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        keyword: this.keyword,
-        region: this.region,
+        keyword: this.region == 1 || this.region =='' ? '' : this.keyword,
+        region: this.region == 1 ? this.keyword : "",
       };
-
-
       // 获取经销商列表
       getCrList(customerParams).then((res) => {
         this.dataL = res.data.records;
-        console.log(res,'获取经销商列表');
+        console.log(res, "获取经销商列表");
 
         this.listTotal = res.data.total;
       });
@@ -201,6 +198,7 @@ export default {
       }
     },
     handleSubmit() {
+
       this.$emit("handleAddPolicy", this.dataR);
     },
   },

+ 22 - 13
src/views/sales_policy/policy_list.vue

@@ -211,9 +211,9 @@
         </el-table-column>
         <el-table-column label="状态" width="120" align="center">
           <template slot-scope="scope">
-            <el-tag v-if="scope.row.examineStatus == 'WAIT'">待审核</el-tag>
-            <el-tag v-else-if="scope.row.examineStatus == 'OK'">通过 </el-tag>
-            <el-tag v-else>失败</el-tag>
+            <el-tag v-if="scope.row.status == '1'">已生效</el-tag>
+            <el-tag v-else-if="scope.row.status == '0'">未生效 </el-tag>
+
           </template>
         </el-table-column>
         <el-table-column
@@ -254,14 +254,14 @@
         >
         </el-table-column>
         <el-table-column
-          prop="examineBy"
+          prop="createBy"
           label="制表人"
           width="120"
           align="center"
         >
         </el-table-column>
         <el-table-column
-          prop="examineBy"
+          prop="createTime"
           label="制表日期"
           width="120"
           align="center"
@@ -290,7 +290,7 @@
       </el-pagination>
     </div>
   </div>
-  <AddPolicy v-else-if="isShow == 2" />
+  <AddPolicy v-else-if="isShow == 2" ref="table"/>
   <AddCondition v-else-if="isShow == 3 || isShow == 6" :id="id" />
   <Examine v-else />
 </template>
@@ -302,7 +302,6 @@ import {
   deletePolicy,
   getpolicySubmit,
   toExamine,
-  getConditionList,
 } from "@/api/supply/sales";
 import Minxin from "@/mixin";
 import { downloadFiles, handleImport } from "@/utils/util";
@@ -368,9 +367,18 @@ export default {
   computed: mapState({
     comCode: (state) => state.sales.code,
   }),
+  watch:{
+    isShow:(val,oval)=>{
+
+      if (val==1) {
+          console.log(val,oval,'强制跟新');
+        this.$refs.table.$forceUpdate();
+      }
+
+    }
+  },
   created() {},
   methods: {
-    // ...mapActions("sales", ["hanlenewInfo"]),
     hanlenewInfo() {
       this.isShow = 2;
       this.$store.dispatch("sales/hanlenewInfo");
@@ -425,7 +433,7 @@ export default {
       };
       downloadFiles("/policy/export", screenData);
     },
-    importFileList() {},
+
     // 导入
     async handleImport(param) {
       this.importLoading = true;
@@ -448,13 +456,14 @@ export default {
       }
     },
     handlesubmit(e) {
-      if (e.examineStatus == "SAVE") {
         getpolicySubmit({ policyId: e.id }).then((res) => {
           this.$successMsg("已提交");
         });
-      } else {
-        this.$errorMsg("未满足条件");
-      }
+      // if (e.examineStatus == "SAVE") {
+
+      // } else {
+      //   this.$errorMsg("未满足条件");
+      // }
     },
     hanleExamine(e) {
       if (e.examineStatus == "WAIT") {

+ 28 - 12
src/views/sales_rebate/salestype_list.vue

@@ -15,7 +15,8 @@
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
             <el-form-item prop='status'>
-              <el-select v-model="screenForm.status" placeholder="请选择" size="small">
+              <el-select v-model="screenForm.status" placeholder="状态" size="small">
+
                 <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
@@ -48,8 +49,10 @@
           <el-table-column align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
             show-overflow-tooltip v-if="col.prop == 'status'">
             <template slot-scope="scope">
-              <el-switch v-model="scope.row.status" disabled :active-text="scope.row.status ? '已启用' : '已禁用'">
+              <div style="z-index:99">
+                <el-switch v-model="scope.row.status" disabled  :active-text="scope.row.status ? '已启用' : '已禁用'">
               </el-switch>
+              </div>
             </template>
           </el-table-column>
           <el-table-column v-else align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
@@ -60,14 +63,26 @@
         <el-table-column align="center" fixed="right" label="操作" min-width="160">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="hanleEdit(scope.row)">编辑</el-button>
-            <el-button type="text" size="small" @click="hanleDateil(scope.row)">详情</el-button>
+            <!-- <el-button type="text" size="small" @click="hanleDateil(scope.row)">详情</el-button> -->
             <el-popconfirm title="这是一段内容确定删除吗?" style="margin-left: 10px;">
               <el-button slot="reference" type="text" size="small" @click="hanleDatele(scope.row.id)">删除</el-button>
             </el-popconfirm>
           </template>
         </el-table-column>
       </el-table>
-      <Pagination />
+        <!-- 分页 -->
+      <div style="margin:20px 0">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+        >
+        </el-pagination>
+      </div>
     </div>
     <div>
       <el-dialog :visible.sync="dialogVisible" width="50%">
@@ -114,7 +129,7 @@
         screenForm: {
           saleCode: '',
           saleName: '',
-          status: 1
+          status: ''
         },
         dialogForm: {
           id: '',
@@ -139,14 +154,10 @@
             lable: "销售类型名称",
             widht: 160
           },
-          {
-            prop: "outType",
-            lable: "出库类型",
-            widht: 160
-          },
+
           {
             prop: "mainName",
-            lable: "品类",
+            lable: "产品大类",
             widht: 160
           },
           {
@@ -198,6 +209,7 @@
         }
         getTypeList(params).then(res => {
           this.dataList = res.data.records
+           this.listTotal = res.data.total;
           this.listLoading = false
         })
       },
@@ -275,4 +287,8 @@
   };
 </script>
 
-<style scoped></style>
+<style scoped>
+.el-switch.is-disabled{
+  opacity:inherit;
+}
+</style>

+ 19 - 7
src/views/setting/account.vue

@@ -136,26 +136,33 @@
             <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="部门" prop="department" v-show="accountType === 0">
+        <el-form-item label="部门" prop="department" v-show="roleObj.type === 0">
           <el-tree
             :data="departmentList"
             show-checkbox
+            :check-strictly="true"
             node-key="adminWebsitId"
             ref="tree"
             highlight-current
             :props="props">
           </el-tree>
         </el-form-item>
-        <el-form-item label="经销商" prop="dealer" v-show="accountType === 0">
+        <el-form-item label="经销商" prop="dealer" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
           <el-select v-model="AccountForm.dealer" placeholder="请选择经销商" style="width: 100%;">
             <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="商户" prop="merchant" v-show="accountType === 1 || accountType === 2">
+        <el-form-item label="商户" prop="merchant" v-show="roleObj.type === 1 || roleObj.type === 2">
           <el-select v-model="AccountForm.merchant" placeholder="请选择商户" style="width: 100%;">
             <el-option :label="item.adminCompanyName" :value="item.adminCompanyId" v-for="(item, index) in merchantList" :key="index"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="集团公司" prop="isGroup" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
+          <el-radio-group v-model="AccountForm.isGroup">
+            <el-radio :label="false">否</el-radio>
+            <el-radio :label="true">是</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="密码" prop="newPassword">
           <el-input v-model="AccountForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码" :type="passwordType1"></el-input>
           <span class="show-pwd" @click="showPwd(1)">
@@ -271,6 +278,7 @@ export default {
         merchant: '', // 商户
         dealer: '', //经销商
         role: '', // 角色组
+        isGroup: false,
         newPassword: '', // 新密码
         confirmPassword: '', // 确认密码
       },
@@ -326,8 +334,8 @@ export default {
         ],
       },
 
-      accountType: '',
       roleList: [], // 角色列表
+      roleObj: {}, // 选中的角色
       merchantList: [],
       dealerList: [],
 
@@ -342,7 +350,7 @@ export default {
     'AccountForm.role'() {
       if(this.AccountForm.role) {
         let index = findElem(this.roleList, 'adminRoleId', this.AccountForm.role);
-        this.accountType = this.roleList[index].type;
+        this.roleObj = this.roleList[index];
       }
     }
   },
@@ -505,6 +513,7 @@ export default {
           this.AccountForm.nickName = res.data.nickName;
           this.AccountForm.merchant = res.data.companyWechatId;
           this.AccountForm.dealer = res.data.customerId;
+          this.AccountForm.isGroup = res.data.isGroupCompany;
           this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
         })
       }
@@ -528,9 +537,12 @@ export default {
             roleId: this.AccountForm.role,
             password: this.AccountForm.newPassword,
           }
-          if(this.accountType === 0) {
+          if(this.roleObj.type === 0) {
             params.adminWebsitIds = this.$refs.tree.getCheckedKeys();
-            params.customerId = this.AccountForm.dealer;
+            if(this.roleObj.name === '经销商') {
+              params.customerId = this.AccountForm.dealer;
+              params.isGroupCompany = this.AccountForm.isGroup;
+            }
           }else {
             params.adminCompanyId = this.AccountForm.merchant;
           }

+ 9 - 6
src/views/supply/apply/components/apply_form.vue

@@ -84,7 +84,7 @@
         </el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
-            <el-button type="text" @click="deleteItem(scope.row.orderId)">删除</el-button>
+            <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -267,6 +267,7 @@ export default {
     getDetail() {
       getApplyDetail({id: this.listItem.id}).then(res => {
         let data = res.data;
+        this.mainForm.orderNum = data.id;
         this.mainForm.date = data.orderTime;
         this.mainForm.jxsNum = data.customerNumber;
         this.mainForm.createMan = data.createBy;
@@ -318,7 +319,8 @@ export default {
         stockId: this.screenForm.warehouse,
         mainId: this.screenForm.type,
         id: this.screenForm.orderNum,
-        // examineStatus: 'OK',
+        examineStatus: 'OK',
+        type: 1,
       }).then(res => {
         let goodsList = [];
         res.data.records.forEach(item => {
@@ -453,10 +455,11 @@ export default {
     },
 
     // 删除产品
-    deleteItem(id) {
-      this.goodsList = this.goodsList.filter((item) => {
-        return item.orderId != id
-      })
+    deleteItem(index) {
+      this.goodsList.splice(index, 1);
+      // this.goodsList = this.goodsList.filter((item) => {
+      //   return item.orderId != id
+      // })
     },
 
     // 保存