1004749546@qq.com 4 年之前
父節點
當前提交
d935cfe176

+ 1 - 1
src/store/modules/user.js

@@ -56,7 +56,7 @@ const user = {
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
-              commit('SET_CHANNELNAME', users.extInfo.channel.salesChannelName)
+              commit('SET_CHANNELNAME', users.parentOrgName)
               commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')

+ 1 - 1
src/views/Home.vue

@@ -30,7 +30,7 @@ export default {
     ResetPwd
   },
   computed: {
-    ...mapGetters(['mustChangePwd'])
+    // ...mapGetters(['mustChangePwd'])
   },
   data () {
     return {

+ 1 - 1
src/views/storehouseManagement/storeBind/StoreBindList.vue

@@ -114,7 +114,7 @@ export default {
       },
       {
         title: '绑定时间',
-        dataIndex: 'settleDate',
+        dataIndex: 'bindDate',
         width: 200,
         align: 'center'
       },

+ 24 - 7
src/views/storehouseManagement/storeBind/StoreBindModal.vue

@@ -18,7 +18,7 @@
             option-filter-prop="children"
             v-model="form.supplierName"
           >
-            <a-select-option v-for="item in supplierList" :key="item.id" :value="item.id">
+            <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">
               {{ item.name }}
             </a-select-option>
           </a-select>
@@ -30,9 +30,10 @@
             allowClear
             placeholder="请选择关联客户"
             option-filter-prop="children"
+            @change="storeChange"
             v-model="form.storeName"
           >
-            <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+            <a-select-option v-for="item in storeList" :key="item.storeSn" :value="item.storeSn">
               {{ item.name }}
             </a-select-option>
           </a-select>
@@ -54,9 +55,7 @@
 </template>
 
 <script>
-import {
-  SettlementRecordsDetailsList
-} from '@/api/FinancialManagement'
+import { supplierStoreBind } from '@/api/storeManagement.js'
 export default {
   props: {
     openStoreBindModal: {
@@ -95,11 +94,29 @@ export default {
   computed: {
   },
   methods: {
+    // 关联客户选择修改
+    storeChange (val) {
+      console.log(val, 'vvvvvvv')
+      if (val) {
+        const has = this.storeList.find(item => item.storeSn == val)
+        this.form.storeAddress = has ? has.addrProvinceName + has.addrCityName + has.addrDistrictName + has.addrDetail : ''
+      }
+    },
     // 提交
     submitForm (formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
-          alert('submit!')
+          const params = {
+            supplierSn: this.form.supplierName,
+            storeSn: this.form.storeName
+          }
+          supplierStoreBind(params).then(res => {
+            if (res.status == 200) {
+              this.$message.success(res.message)
+              this.$emit('refresh')
+              this.cancel()
+            }
+          })
         } else {
           console.log('error submit!!')
           return false
@@ -118,9 +135,9 @@ export default {
 	  },
 	  isshow (val) {
 	    if (!val) {
+        this.$refs['ruleForm'].resetFields()
 	      this.$emit('close')
 	    } else {
-        this.$refs['ruleForm'].resetFields()
       }
 	  },
 	  settleId (newValue, oldValue) {