zhangdan há 3 anos atrás
pai
commit
d25961c9b0

+ 4 - 3
src/components/UploadFile/index.vue

@@ -225,13 +225,14 @@ export default {
       }
 
       // 文件大小
-      const isLt2M = file.size / 1024 < this.fileSize
+      const isLt2M = file.size / 1024 / 1024 < this.fileSize
+      // const isMaxsize=file.size / 1024/1024 < this.fileSize
       if (!isLt2M) {
         if (tip != 0) {
           if (this.fileType != 'video/mp4') {
-            this.$message.error('图片不能超过 ' + this.fileSize + 'KB!')
+            this.$message.error('图片不能超过 ' + this.fileSize * 1024 + 'KB!')
           } else {
-            this.$message.error('视频不能超过 ' + this.fileSize + 'KB!')
+            this.$message.error('视频不能超过 ' + this.fileSize + ' MB!')
           }
         }
         return isLt2M

+ 20 - 16
src/views/numsGoodsShelves/bondManagement/addbond.vue

@@ -1,15 +1,15 @@
 <template>
   <div>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-modal
-        centered
-        wrapClassName="addbond-modal"
-        :footer="null"
-        :maskClosable="false"
-        :title="titleText"
-        v-model="isshow"
-        @cancle="isshow=false"
-        :width="650">
+    <a-modal
+      centered
+      wrapClassName="addbond-modal"
+      :footer="null"
+      :maskClosable="false"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="isshow=false"
+      :width="650">
+      <a-spin :spinning="spinning" tip="Loading...">
         <a-form-model
           id="addbond-form"
           ref="ruleForm"
@@ -56,8 +56,8 @@
             <a-button :style="{ marginLeft: '8px' }" @click="isshow=false" id="addbond-close">取消</a-button>
           </a-form-model-item>
         </a-form-model>
-      </a-modal>
-    </a-spin>
+      </a-spin>
+    </a-modal>
   </div>
 </template>
 
@@ -144,7 +144,7 @@ export default {
       this.spinning = true
       shelfDetail({ shelfSn: val }).then(res => {
         if (res.status == 200) {
-          this.dealerName = res.data.dealerEntity ? res.data.dealerEntity.dealerName : ''
+          this.dealerName = res.data.dealerName
           this.shelfName = res.data.shelfName
           this.storeName = res.data.storeName
           this.form = Object.assign({}, res.data)
@@ -158,7 +158,7 @@ export default {
     // 保证金详情
     getBoundDetail () {
       this.spinning = true
-      bondRecordDetail({ bondRecordSn: this.nowData.bondRecordSn }).then(res => {
+      bondRecordDetail({ bondRecordSn: this.nowData ? this.nowData.bondRecordSn : '' }).then(res => {
         if (res.status == 200) {
           this.dealerName = res.data.dealerName
           this.shelfName = res.data.shelfName
@@ -203,7 +203,12 @@ export default {
     },
     isshow (newValue, oldValue) {
       if (!newValue) {
-        this.form = {}
+        this.form = {
+          dealerSn: undefined, // 经销商sn
+          bondAmount: '', // 保证金金额
+          storeSn: undefined, // 汽车修理厂sn
+          shelfSn: '' // 货架名称
+        }
         this.dealerName = ''
         this.shelfName = ''
         this.storeName =
@@ -219,7 +224,6 @@ export default {
             this.titleText = '编辑保证金'
             this.getBoundDetail()
           } else {
-            this.getShelfDetail()
             this.titleText = '新增保证金'
           }
         }

+ 3 - 3
src/views/numsGoodsShelves/bondManagement/list.vue

@@ -22,7 +22,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="状态">
-                  <v-select id="bondManagementList-bondRecordState" code="BOND_RECORD_STATE" v-model="queryParam.bondRecordState" allowClear placeholder="请选择状态"></v-select>
+                  <v-select id="bondManagementList-state" code="BOND_RECORD_STATE" v-model="queryParam.state" allowClear placeholder="请选择状态"></v-select>
                 </a-form-item>
               </a-col>
             </template>
@@ -94,7 +94,7 @@ export default {
       // 查询参数
       queryParam: {
         shelfName: '',
-        bondRecordState: undefined
+        state: undefined
       },
       showModal: false,
       itemData: null, // 编辑行数据
@@ -156,7 +156,7 @@ export default {
     reset () {
       this.queryParam = {
         shelfName: '',
-        bondRecordState: undefined
+        state: undefined
       }
       this.$refs.dealerList.resetForm()
       this.$refs.storeList.resetForm()

+ 1 - 1
src/views/numsGoodsShelves/goodsShelvesAdministration/addGoodsShelve.vue

@@ -57,7 +57,7 @@
                   class="upload"
                   id="addGoodsShelve-images"
                   v-model="form.images"
-                  :fileSize="500"
+                  :fileSize="500/1024"
                   ref="images"
                   @change="changeImage"
                   :maxNums="5"

+ 3 - 4
src/views/numsGoodsShelves/goodsShelvesAdministration/list.vue

@@ -22,7 +22,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="货架状态">
-                  <v-select id="goodsShelvesAdministrationList-shelfState" code="SHELF_STATE" v-model="queryParam.shelfState" allowClear placeholder="请选择状态"></v-select>
+                  <v-select id="goodsShelvesAdministrationList-state" code="SHELF_STATE" v-model="queryParam.state" allowClear placeholder="请选择状态"></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -93,7 +93,7 @@ export default {
       queryParam: {
         dealerSn: undefined, // 配件经销商sn
         shelfName: '', // 货架名称
-        shelfState: '', // 货架状态
+        state: '', // 货架状态
         settleType: '', // 结算状态
         storeSn: undefined, // 汽车修理厂
         state: undefined// 货架状态
@@ -105,7 +105,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '货架名称', dataIndex: 'shelfName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '配件经销商', dataIndex: 'dealerEntity.dealerName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '配件经销商', dataIndex: 'dealerName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '汽车修理厂', dataIndex: 'storeName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '货位数量', dataIndex: 'shelfPlaceNum', width: '7%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
         { title: '结算方式', dataIndex: 'settleTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -156,7 +156,6 @@ export default {
       this.queryParam = {
         dealerSn: undefined, // 配件经销商sn
         shelfName: '', // 货架名称
-        shelfState: '', // 货架状态
         settleType: '', // 结算状态
         storeSn: undefined, // 汽车修理厂
         state: undefined// 货架状态

+ 5 - 5
src/views/numsGoodsShelves/partsDealerManagement/list.vue

@@ -67,10 +67,10 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '配件经销商(商户名称)', dataIndex: 'dealerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '联系人', dataIndex: 'contact', width: '20%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '联系电话', dataIndex: 'dealerTelephone', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '合作状态', dataIndex: 'cooperateFlagDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '配件经销商(商户名称)', dataIndex: 'dealerEntity.dealerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '联系人', dataIndex: 'dealerEntity.contact', width: '20%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '联系电话', dataIndex: 'dealerEntity.dealerTelephone', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '合作状态', dataIndex: 'dealerEntity.cooperateFlagDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '平台商户号', dataIndex: 'merchantNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', width: '10%', align: 'left', scopedSlots: { customRender: 'action' } }
       ],
@@ -96,7 +96,7 @@ export default {
   methods: {
     // 经销商 change
     dealerChange (obj) {
-      this.queryParam.dealerSn = obj.key || undefined
+      this.queryParam.merchantSn = obj.key || undefined
     },
     // 汽车修理厂 change
     storeChange (obj) {

+ 23 - 16
src/views/numsGoodsShelves/partsDealerManagement/setSHModal.vue

@@ -21,7 +21,7 @@
         >
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-model-item label="配件经销商" prop="shelfSn" >
+              <a-form-model-item label="配件经销商" >
                 <span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
               </a-form-model-item>
             </a-col>
@@ -32,17 +32,17 @@
             </a-col>
             <a-col :span="24">
               <a-form-model-item label="结算账户名" prop="bankAccount">
-                <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankAccount" placeholder="请输入结算账户名"/>
+                <a-input id="userList-name" allowClear v-model.trim="form.bankAccount" placeholder="请输入结算账户名"/>
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
               <a-form-model-item label="结算账户号" prop="bankCard">
-                <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankCard" placeholder="请输入结算账户号"/>
+                <a-input id="userList-name" allowClear v-model.trim="form.bankCard" placeholder="请输入结算账户号"/>
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
               <a-form-model-item label="开户银行" prop="bankName">
-                <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankName" placeholder="请输入开户银行"/>
+                <a-input id="userList-name" allowClear v-model.trim="form.bankName" placeholder="请输入开户银行"/>
               </a-form-model-item>
             </a-col>
           </a-row>
@@ -87,11 +87,9 @@ export default {
         dealerEntity: {
           dealerName: ''
         },
-        merchantBankAccountEntity: {
-          bankName: '', // 开户行
-          bankAccount: '', // 账户名
-          bankCard: '' // 账户号
-        },
+        bankName: '', // 开户行
+        bankAccount: '', // 账户名
+        bankCard: '', // 账户号
         merchantNo: '' // 保证金金额
       },
       rules: {
@@ -108,11 +106,9 @@ export default {
         dealerEntity: {
           dealerName: ''
         },
-        merchantBankAccountEntity: {
-          bankName: '', // 开户行
-          bankAccount: '', // 账户名
-          bankCard: '' // 账户号
-        },
+        bankName: '', // 开户行
+        bankAccount: '', // 账户名
+        bankCard: '', // 账户号
         merchantNo: '' // 保证金金额
       }
       this.$refs.ruleForm.resetFields()
@@ -124,6 +120,9 @@ export default {
       merchantAccountDetail({ merchantSn: this.nowData.merchantSn, merchantType: this.nowData.merchantType }).then(res => {
         if (res.status == 200) {
           this.form = Object.assign({}, res.data)
+          this.form.bankName = res.data.merchantBankAccountEntity.bankName
+          this.form.bankAccount = res.data.merchantBankAccountEntity.bankAccount
+          this.form.bankCard = res.data.merchantBankAccountEntity.bankCard
         } else {
         }
         this.spinning = false
@@ -134,7 +133,13 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const params = JSON.parse(JSON.stringify(_this.form))
+          // const params = JSON.parse(JSON.stringify(_this.form))
+          const params = Object.assign({}, _this.form)
+          if (params.bankName && params.bankAccount && params.bankCard) {
+            params.merchantBankAccountEntity.bankName = params.bankName
+            params.merchantBankAccountEntity.bankAccount = params.bankAccount
+            params.merchantBankAccountEntity.bankCard = params.bankCard
+          }
           params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
           _this.spinning = true
           saveMerchantAccount(params).then(res => {
@@ -165,13 +170,15 @@ export default {
         this.form = {}
         this.close()
         this.$refs.ruleForm.resetFields()
+      } else {
+        this.getMerchantAccountDetail()
       }
     },
     nowData: {
       handler (newValue, oldValue) {
         if (this.isshow && newValue) {
           if (this.nowData.id) { //  编辑
-            this.getMerchantAccountDetail()
+
           }
         }
       },