Pārlūkot izejas kodu

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

chenrui 2 gadi atpakaļ
vecāks
revīzija
42f414c3c6

+ 1 - 1
src/api/sales.js

@@ -51,7 +51,7 @@ export const salesSave = (params) => {
 // 销售 编辑
 export const salesModify = (params) => {
   return axios({
-    url: '/sales/modify',
+    url: '/sales/modifyWarehouse',
     data: params,
     method: 'post'
   })

+ 9 - 0
src/api/warehouse.js

@@ -11,6 +11,15 @@ export const warehouseList = (params) => {
     method: 'post'
   })
 }
+
+// 获取默认仓库
+export const getDefaultWarehouse = (params) => {
+  return axios({
+    url: '/warehouse/getDefaultWithExt',
+    data: params,
+    method: 'get'
+  })
+}
 //  仓库列表  无分页 有权限
 export const queryAuthWarehouse = (params) => {
   return axios({

+ 0 - 4
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -383,8 +383,6 @@ export default {
           'allocateNo': item.allocateNo,
           'allocateSn': item.allocateSn,
           'oldPrice': item.oldPrice,
-          'cost': item.cost,
-          'returnQty': item.returnQty,
           'price': item.returnPrice,
           'productSn': item.productSn,
           'productCode': item.productCode
@@ -507,8 +505,6 @@ export default {
       const params = {
         allocateReturnSn: this.$route.params.sn,
         productSn: row.productSn,
-        cost: row.cost,
-        returnQty: row.returnQty,
         price: isEdit ? row.price : row.returnPrice,
         allocateNo: row.allocateNo,
         allocateSn: row.allocateSn

+ 2 - 2
src/views/common/chooseWarehouse.js

@@ -80,10 +80,10 @@ const warehouse = {
       const ajaxName = this.isPermission ? queryAuthWarehouse : warehouseAllList
       ajaxName({}).then(res => {
         if (res.status == 200) {
+          // 有权限控制的
           if(this.isPermission){
             this.$store.state.app.isWarehouse = res.data && res.data.length > 1
-            const defWarehouse = res.data.find(item => item.defaultFlag == 1)
-            this.$store.state.app.defWarehouse = this.isPermission ? res.data && res.data[0] : defWarehouse
+            this.$store.state.app.defWarehouse = res.data && res.data[0]
           }
           this.warehouseData = res.data || []
         } else {

+ 10 - 10
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -147,22 +147,22 @@ export default {
     // 列表表头
     columns () {
       const arr = [
-        { title: '入库时间', dataIndex: 'putTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '16%', align: 'center' },
-        { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '22%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '12%', align: 'center' },
+        { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '18%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'auditStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据状态', dataIndex: 'auditStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remark', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.isShowWarehouse) {
-        arr.splice(3, 0, { title: '仓库', dataIndex: 'warehouseName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
+        arr.splice(3, 0, { title: '仓库', dataIndex: 'warehouseName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
       if (this.$hasPermissions('M_warehousingConfirmationList_costPrice')) { // 成本价权限
-        arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
 
       return arr

+ 2 - 2
src/views/salesManagement/receiptPrint/list.vue

@@ -57,8 +57,8 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="currentTab==2?24:6" :sm="24">
-                <span class="table-page-search-submitButtons" :style="{float:currentTab==2?'right':'none'}">
+              <a-col :md="6" :sm="24">
+                <span class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 </span>

+ 5 - 7
src/views/salesManagement/salesQuery/edit.vue

@@ -63,7 +63,7 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
                   </a-col>
                 </a-row>
@@ -87,16 +87,13 @@
                     </a-menu-item>
                   </a-menu>
                   <a-button
-                    size="small"
                     style="margin:0 15px;"
-                    type="danger"
-                    class="button-info"
+                    type="primary"
+                    ghost
                     id="salesEdit-plDel-btn"> 批量删除 <a-icon type="down" /> </a-button>
                 </a-dropdown>
                 <a-button
-                  size="small"
-                  type="primary"
-                  class="button-info"
+                  type="default"
                   id="salesEdit-import-btn"
                   @click="openGuideModal=true">导入产品</a-button>
               </div>
@@ -319,6 +316,7 @@ export default {
           _this.spinning = false
         } else {
           _this.spinning = false
+          _this.warehouseSn = _this.$route.params.wSn
         }
       })
     },

+ 1 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -32,7 +32,7 @@
             </a-col>
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin: 0 5px">
               {{ advanced ? '收起' : '展开' }}

+ 9 - 5
src/views/salesReturnManagement/salesReturn/chooseCustomModal.vue

@@ -55,6 +55,7 @@
           <a-form-model-item label="退货仓库" prop="warehouseSn">
               <warehouse
                 v-model="form.warehouseSn"
+                showDef
                 disabled
                 id="chooseCustom-basicInfo-warehouseSn"
                 placeholder="请选择退货仓库"
@@ -76,6 +77,7 @@ import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import warehouse from '@/views/common/chooseWarehouse.js'
 import { dealerSubareaScopeList, dealerDetailBySn } from '@/api/dealer'
+import { getDefaultWarehouse } from '@/api/warehouse'
 import { salesReturnInsert } from '@/api/salesReturn'
 export default {
   name: 'SalesReturnChooseCustomModal',
@@ -189,6 +191,11 @@ export default {
         }
       })
     },
+    getDefaultWarehouse(){
+      getDefaultWarehouse().then(res => {
+        this.form.warehouseSn = res.data ? res.data.warehouseSn : undefined
+      })
+    },
     cancel () {
       this.opened = false
       this.form = {
@@ -215,12 +222,9 @@ export default {
   watch: {
     show (newValue, oldValue) {
       this.opened = newValue
-      if (newValue) {
-        this.form.warehouseSn = this.defWarehouse&&this.defWarehouse.warehouseSn
+      if(newValue){
+        this.getDefaultWarehouse()
       }
-    },
-    defWarehouse(a,b){
-      this.form.warehouseSn = a&&a.warehouseSn
     }
   }
 }