فهرست منبع

Merge branch 'develop_fencang' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_fencang

lilei 2 سال پیش
والد
کامیت
6920a2b383

+ 2 - 2
src/config/router.config.js

@@ -2878,7 +2878,7 @@ export const asyncRouterMap = [
             name: 'businessOwnerSettings',
             component: BlankLayout,
             meta: {
-              title: '业务负责人配置',
+              title: '数据权限配置',
               icon: 'stock',
               permission: 'M_businessOwnerSettings'
             },
@@ -2889,7 +2889,7 @@ export const asyncRouterMap = [
                 name: 'businessOwnerSettingsList',
                 component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/businessOwnerSettings/list.vue'),
                 meta: {
-                  title: '业务负责人配置列表',
+                  title: '数据权限配置列表',
                   icon: 'stock',
                   hidden: true,
                   permission: 'M_businessOwnerSettingsList'

+ 36 - 2
src/views/basicData/warehouse/editModal.vue

@@ -28,6 +28,22 @@
               placeholder="请输入仓库名称(最多30个字符)"
               allowClear />
           </a-form-model-item>
+          <a-form-model-item label="地址" prop="address">
+            <AreaList id="allocationPresentationList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+            <a-input
+              style="margin-top:24px;"
+              id="warehouseEdit-desc"
+              v-model.trim="form.desc"
+              placeholder="请输入详细地址"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="ERP仓库编码" prop="warehouseCode">
+            <a-input
+              id="warehouseEdit-code"
+              v-model.trim="form.code"
+              placeholder="请输入ERP仓库编码"
+              allowClear />
+          </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
           <a-button type="primary" id="warehouse-edit-modal-save" @click="handleSave">保存</a-button>
@@ -42,10 +58,11 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { warehouseSave } from '@/api/warehouse'
+import AreaList from '@/views/common/areaList.js'
 export default {
   name: 'WarehouseEditModal',
   mixins: [commonMixin],
-  components: { STable },
+  components: { STable, AreaList },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -74,11 +91,22 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        name: '' // 仓库名称
+        name: '', // 仓库名称
+        address: '',
+        provinceSn: undefined,
+        citySn: undefined,
+        districtSn: undefined,
+        code: undefined// ERP仓库编码
       },
       rules: {
         name: [
           { required: true, message: '请输入仓库名称', trigger: 'blur' }
+        ],
+        address: [
+          { required: true, message: '请选择详细地址', trigger: 'change' }
+        ],
+        warehouseCode: [
+          { required: true, message: '请输入ERP仓库编码', trigger: 'blur' }
         ]
       }
     }
@@ -91,6 +119,12 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.name = str
     },
+    areaChange (val) {
+      this.form.address = val
+      this.form.provinceSn = val[0] ? val[0] : ''
+      this.form.citySn = val[1] ? val[1] : ''
+      this.form.districtSn = val[2] ? val[2] : ''
+    },
     //  详情
     getDetail () {
       this.form = {

+ 1 - 0
src/views/basicData/warehouse/list.vue

@@ -132,6 +132,7 @@ export default {
       this.openModal = false
     },
     //  删除
+    // 有客户已绑定该仓库出库,确认要删除吗?如果删除,默认仓库变更为【仓库一】!
     handleDel (row) {
       const _this = this
       this.$confirm({

+ 79 - 0
src/views/common/chooseWarehouse.js

@@ -0,0 +1,79 @@
+import { warehouseList } from '@/api/warehouse'
+const warehouse = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        :disabled="disabled"
+        :mode="modeType"
+        @change="handleChange"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in warehouseData" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择仓库'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    modeType: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      warehouseData: [],
+      pageNo: 1,
+      pageSize: 1000
+    }
+  },
+  mounted () {
+    this.getWarehouse()
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange (value) {
+      this.defaultVal = value
+      this.$emit('input', value)
+      this.$emit('change', value)
+    },
+    //  获取仓库列表
+    getWarehouse () {
+      warehouseList({ pageNo: 1, pageSize: 1000 }).then(res => {
+        if (res.status == 200) {
+          this.warehouseData = res.data.list
+        } else {
+          this.warehouseData = []
+        }
+      })
+    }
+  }
+}
+
+export default warehouse

+ 8 - 1
src/views/dealerManagement/businessOwnerSettings/addModal.vue

@@ -48,6 +48,9 @@
             </a-radio>
           </a-radio-group>
         </a-form-model-item>
+        <a-form-model-item label="管辖仓库" prop="warehouse" >
+          <chooseWarehouse ref="warehouse" modeType="multiple" @change="handleWarehouse"></chooseWarehouse>
+        </a-form-model-item>
         <div style="display: flex;justify-content: center;padding: 30px 0;">
           <a-button type="primary" @click="handleSave">{{ itemId?'保存':'确定' }}</a-button>
           <a-button style="margin-left: 15px;" @click="isShow=false">取消</a-button>
@@ -60,11 +63,12 @@
 <script>
 
 import userName from '@/views/common/userName'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { VSelect } from '@/components'
 import { bizuserSave } from '@/api/bizuser.js'
 export default {
   name: 'ProductInfoDetailModal',
-  components: { VSelect, userName },
+  components: { VSelect, userName, chooseWarehouse },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -118,6 +122,9 @@ export default {
         }
       })
     },
+    handleWarehouse (val) {
+      console.log('warehouseSn:', val)
+    },
     resetSearchForm () {
       this.$refs.userName.resetForm()
       this.user_name = ''

+ 1 - 0
src/views/dealerManagement/businessOwnerSettings/list.vue

@@ -84,6 +84,7 @@ export default {
         { title: '人员类型', dataIndex: 'bizUserTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖经销商', dataIndex: 'allDealerFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '管辖品类', dataIndex: 'allProductFlagDictValue', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '管辖仓库', dataIndex: 'warehouse', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 10 - 1
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -117,6 +117,11 @@
                       placeholder="请输入财务编码(最多30个字符)" />
                   </a-form-model-item>
                 </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="默认仓库" prop="defaultWarehouse" >
+                    <chooseWarehouse ref="warehouse" value="4" @change="handleWarehouse"></chooseWarehouse>
+                  </a-form-model-item>
+                </a-col>
               </a-row>
             </a-collapse-panel>
           </a-collapse>
@@ -409,11 +414,12 @@ import { commonMixin } from '@/utils/mixin'
 import { getArea } from '@/api/data'
 import { VSelect } from '@/components'
 import { dealerSave, dealerFindUpdateInfoBySn } from '@/api/dealer'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import moment from 'moment'
 export default {
   name: 'MerchantInfoManagementEdit',
   mixins: [commonMixin],
-  components: { VSelect },
+  components: { VSelect, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -532,6 +538,9 @@ export default {
     }
   },
   methods: {
+    handleWarehouse (val) {
+
+    },
     bankAccountChange (e) {
       const { value } = e.target
       console.log(value, value.replace(/\s*/g, ''))