Ver Fonte

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

chenrui há 2 anos atrás
pai
commit
b71dacc3a2

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.15",
+    "version": "2.2.16",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 7 - 6
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -70,7 +70,7 @@
                   <a-input id="collectionDetail-payerAccountInfo" placeholder="请输入付款账户" v-model="queryParam.payerAccountInfo"></a-input>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="足额打款">
                   <v-select
                     v-model="queryParam.fullPaymentFlag"
@@ -81,16 +81,17 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="户名/汇入银行">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="户名">
                   <a-select placeholder="请选择户名" allowClear v-model="queryParam.bankAccount" style="width: 100%" @change="handleChange">
                     <a-select-option v-for="item in bankList" :value="item.bankAccount">
                       {{ item.bankAccount }}
                     </a-select-option>
                   </a-select>
-                </a-form-item></a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="汇入银行">
                   <a-select placeholder="请选择汇入银行" allowClear v-model="queryParam.bankName" style="width: 100%">
                     <a-select-option v-for="item in bankNameList" :value="item">
                       {{ item }}

+ 2 - 32
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -18,16 +18,7 @@
             <a-descriptions :column="3">
               <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="入库仓库">
-                <warehouse
-                style="width:200px;"
-                :allowClear="false"
-                  v-model="productTotal.warehouseSn"
-                  @change="updateWarehouse"
-                  id="basicInfo-warehouseSn"
-                  placeholder="请选择入库仓库"
-                />
-              </a-descriptions-item>
+              <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -126,12 +117,11 @@ import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import sparePartsProductModal from './productModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
-import warehouse from '@/views/common/chooseWarehouse.js'
 import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert, sparePartsSave } from '@/api/spareParts'
 export default {
   name: 'BulkWarehousingOrderEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, sparePartsProductModal, ImportGuideModal, warehouse },
+  components: { STable, VSelect, sparePartsProductModal, ImportGuideModal },
   data () {
     return {
       spinning: false,
@@ -192,26 +182,6 @@ export default {
       this.itemSn = ''
       this.openModal = false
     },
-    // 修改仓库
-    updateWarehouse(warehouseSn){
-      const _this = this
-      _this.spinning = true
-      const params = {
-        id:this.productTotal.id,
-        warehouseSn: warehouseSn,
-        supplierSn: this.productTotal.supplierSn, // 供应商
-        sparePartsType: this.productTotal.sparePartsType, //  散件类型
-        relationNo: this.productTotal.relationNo, //  关联单号
-        remark: this.productTotal.remark // 备注
-      }
-      sparePartsSave(params).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-        }
-        _this.$refs.table.refresh()
-        _this.spinning = false
-      })
-    },
     //  删除
     handleDel (row) {
       const _this = this

+ 5 - 4
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -226,16 +226,17 @@ export default {
 	      // { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'relationNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
 	      { title: '金蝶单号', dataIndex: 'kingdeeNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-	      { title: '状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+	      { title: '状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
 	      { title: '备注', dataIndex: 'remark', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
 	      { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
 	    ]
-      if (this.isShowWarehouse) {
-        arr.splice(6, 0, { title: '入库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
-      }
+      
 	    if (this.$hasPermissions('M_bulkWarehousingOrderList_costPrice')) { //  成本价权限
 	      arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
 	    }
+      if (this.isShowWarehouse) {
+        arr.splice(this.$hasPermissions('M_bulkWarehousingOrderList_costPrice')?6:5, 0, { title: '入库仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
 	    return arr
 	  }
   },

+ 24 - 50
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -40,16 +40,18 @@
         <a-form-model-item label="产品名称" prop="productName">{{ form.productName || '--' }}</a-form-model-item>
         <a-form-model-item label="原厂编码" prop="productOrigCode">{{ form.productOrigCode || '--' }}</a-form-model-item>
         <a-form-model-item label="仓库仓位" prop="warehouseLocationSn">
-          <a-cascader
-            @change="changeWarehouseCascade"
-            v-model="defaultWarehouseCascade"
-            expand-trigger="hover"
-            :allowClear="false"
-            :options="warehouseCascadeData"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+          {{ (nowData&&nowData.warehouseName) || '--' }} > 
+            <a-select 
             id="bulkWarehousingOrder-product-warehouse"
-            placeholder="请选择仓库仓位"
-            style="width: 100%;" />
+             @change="changeWarehouseCascade" 
+             placeholder="请选择仓位" 
+             :allowClear="false" 
+             style="width: 50%;" 
+             v-model="form.warehouseLocationSn">
+              <a-select-option v-for="item in warehouseCascadeData" :value="item.sn">
+                {{ item.name }}
+              </a-select-option>
+            </a-select> 
         </a-form-model-item>
         <a-form-model-item label="成本价">
           <span style="margin-right:20px;">{{ form.productCost ? toThousands(form.productCost) : '--' }}</span>
@@ -117,9 +119,8 @@ export default {
         productName: '',
         productCode: '',
         productOrigCode: '',
-        warehouse: [],
         warehouseSn: '',
-        warehouseLocationSn: '',
+        warehouseLocationSn: undefined,
         productCost: '',
         productQty: ''
       },
@@ -143,7 +144,6 @@ export default {
       warehouseCascadeData: [], //  仓库仓位  下拉数据
       warehouseSnBackups: '', //  仓库备份数据
       warehouseLocationSnBackups: '', //  仓位备份数据
-      defaultWarehouseCascade: [], //  默认仓库仓位
       isGift: false
     }
   },
@@ -191,7 +191,6 @@ export default {
           const data = res.data
           this.form = Object.assign(this.form, data)
           // this.fetchUser(this.form.productCode)
-          this.form.warehouse = [this.form.warehouseSn, this.form.warehouseLocationSn]
           this.warehouseSnBackups = this.form.warehouseSn || undefined
           this.warehouseLocationSnBackups = this.form.warehouseLocationSn || undefined
           this.isGift = this.form.giftFlag == 1
@@ -243,22 +242,8 @@ export default {
       })
     },
     changeWarehouseCascade (val) {
-      if (val.length < 2) {
-        this.$message.warning('当前仓库无仓位,请选择其他仓库')
-        this.form.warehouseSn = this.warehouseSnBackups
-        this.form.warehouseLocationSn = this.warehouseLocationSnBackups
-        if (this.warehouseSnBackups || this.warehouseLocationSnBackups) {
-          this.form.warehouse = [this.warehouseSnBackups, this.warehouseLocationSnBackups]
-        } else {
-          this.form.warehouse = []
-        }
-      } else {
-        this.form.warehouseSn = val[0] ? val[0] : ''
-        this.form.warehouseLocationSn = val[1] ? val[1] : ''
-        this.warehouseSnBackups = this.form.warehouseSn
-        this.warehouseLocationSnBackups = this.form.warehouseLocationSn
-      }
       this.$refs.productQty.focus()
+      this.$refs.ruleForm.validate()
     },
     //  仓库仓位  级联  列表
     getWarehouseCascade () {
@@ -267,28 +252,22 @@ export default {
         if (res.status == 200) {
           // 默认仓库
           const defSn = this.isShowWarehouse ? this.nowData.warehouseSn : this.defWarehouse&&this.defWarehouse.warehouseSn
-          this.defaultWarehouseCascade[0] = defSn
+          _this.form.warehouseSn = defSn
+          _this.warehouseSnBackups = defSn
           const data = res.data.find(item => item.warehouseSn == defSn)
-          if(data){
-            data.sn = data.warehouseSn
-            if (data.warehouseLocationList) {
-              data.warehouseLocationList.map(subItem => {
-                  subItem.sn = subItem.warehouseLocationSn
-                  if(subItem.defaultFlag == 1){
-                    _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
-                    _this.form.warehouse = _this.defaultWarehouseCascade
-                    _this.form.warehouseSn = _this.defaultWarehouseCascade[0] || undefined
-                    _this.form.warehouseLocationSn = _this.defaultWarehouseCascade[1] || undefined
-                    _this.warehouseSnBackups = _this.defaultWarehouseCascade[0] || undefined
-                    _this.warehouseLocationSnBackups = _this.defaultWarehouseCascade[1] || undefined
-                  }
-                })
+          console.log(data.warehouseLocationList)
+          if(data&&data.warehouseLocationList){
+            data.warehouseLocationList.map(subItem => {
+              subItem.sn = subItem.warehouseLocationSn
+              if(subItem.defaultFlag == 1){
+                _this.form.warehouseLocationSn = subItem.warehouseLocationSn
+                _this.warehouseLocationSnBackups = subItem.warehouseLocationSn
               }
-            this.warehouseCascadeData = [data]
+            })
+            this.warehouseCascadeData = data.warehouseLocationList
           }else{
             this.warehouseCascadeData = []
           }
-          
         } else {
           this.warehouseCascadeData = []
         }
@@ -302,13 +281,11 @@ export default {
         productName: '',
         productCode: '',
         productOrigCode: '',
-        warehouse: [],
         warehouseSn: this.warehouseSnBackups,
         warehouseLocationSn: this.warehouseLocationSnBackups,
         productCost: '',
         productQty: ''
       }
-      this.defaultWarehouseCascade = [this.warehouseSnBackups,this.warehouseLocationSnBackups]
       this.productCost = ''
       this.isGift = false
     }
@@ -326,9 +303,6 @@ export default {
         this.warehouseSnBackups = ''
         this.warehouseLocationSnBackups = ''
       } else {
-        this.$nextTick(() => {
-          this.resetData()
-        })
         this.getWarehouseCascade()
       }
     },

+ 4 - 0
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -107,9 +107,13 @@ export default {
         this.form.buyerName = val.name || ''
         this.$refs.ruleForm.clearValidate()
         this.getDefaultAddress()
+        if(val.row){
+          this.form.warehouseSn = val.row.defaultWarehouseSn
+        }
       } else {
         this.form.buyerName = ''
         this.form.buyerSn = undefined
+        this.form.warehouseSn = undefined
         this.verifyFun(this.addressId)
       }
     },