Procházet zdrojové kódy

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy

lilei před 4 roky
rodič
revize
34cf2dc7cd

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

@@ -614,7 +614,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add',
+                path: 'add/:id/:sn',
                 name: 'chainTransferOutAdd',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/edit.vue'),
                 meta: {
@@ -625,7 +625,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:id',
+                path: 'edit/:id/:sn',
                 name: 'chainTransferOutEdit',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/edit.vue'),
                 meta: {
@@ -636,7 +636,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id/:sn',
+                path: 'detail/:sn',
                 name: 'chainTransferOutDetail',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/detail.vue'),
                 meta: {

+ 3 - 16
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -105,7 +105,7 @@
             </template>
             <!-- 操作 -->
             <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="link" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
             </template>
           </a-table>
         </a-collapse-panel>
@@ -160,7 +160,7 @@
             bordered>
             <!-- 操作 -->
             <template slot="action" slot-scope="text, record">
-              <a-button size="small" type="link" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
+              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
             </template>
           </s-table>
         </a-collapse-panel>
@@ -177,21 +177,18 @@
           style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import basicInfoModal from './basicInfoModal.vue'
 import { allocLinkageOutDetailSn, allocLinkageOutDetailList } from '@/api/allocLinkageOut'
 import { productQuery } from '@/api/allocWarehouse'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseAllList } from '@/api/warehouse'
 export default {
-  components: { STable, VSelect, basicInfoModal },
+  components: { STable, VSelect },
   data () {
     return {
       queryParam: {
@@ -267,7 +264,6 @@ export default {
           return data
         })
       },
-      openModal: false, // 选择基本信息弹框是否显示
       basicInfoData: null, //  基本信息
       productTotal: null //  合计
     }
@@ -297,14 +293,6 @@ export default {
     handleAdd (row) {},
     //  删除
     handleDel (row) {},
-    //  编辑基本信息
-    handleEditInfo () {
-      this.openModal = true
-    },
-    //  基本信息  保存
-    handleOk () {
-
-    },
     //  提交
     handleSubmit () {},
     //  导入明细
@@ -391,7 +379,6 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.openModal = false
       vm.getDetail()
       vm.getProductList(1)
       vm.getWarehouseList()

+ 8 - 8
src/views/allocationManagement/chainTransferOut/list.vue

@@ -64,7 +64,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button id="chainTransferOutList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      <a-button id="chainTransferOutList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
     </div>
     <!-- 列表 -->
     <s-table
@@ -74,7 +74,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1500 }"
+      :scroll="{ x: 1680 }"
       bordered>
       <!-- 连锁调出单号 -->
       <template slot="allocationLinkageOutNo" slot-scope="text, record">
@@ -113,16 +113,16 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '连锁调出单号', dataIndex: 'allocationLinkageOutNo', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putTenantName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, align: 'center' },
+        { title: '调往对象', dataIndex: 'putTenantName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总成本', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'allocationType', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 110, align: 'center' },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 110, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 260, align: 'center', fixed: 'right' }
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 210, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -209,7 +209,7 @@ export default {
     },
     //  新增/编辑
     handleEdit (row) {
-      this.openModal = true
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${row.id}/${row.allocationLinkageOutSn}` })
     }
   }
 }

+ 12 - 13
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -5,7 +5,6 @@
       <template slot="subTitle">
         <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <span style="margin: 0 15px;color: #666;">调往对象名称:{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</span>
-        <!-- <a-button id="storeTransferOutEdit-edit-btn" size="small" @click="handleEditInfo" style="margin-left:10px" key="0">编辑</a-button> -->
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -85,6 +84,7 @@
             size="small"
             :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
             :columns="columns"
+            :customRow="handleClickRow"
             :data="loadData"
             :scroll="{ x: 1080, y: 300 }"
             bordered>
@@ -174,14 +174,11 @@
           style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import basicInfoModal from './basicInfoModal.vue'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit } from '@/api/storeCallOut'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
@@ -189,7 +186,7 @@ import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseAllList } from '@/api/warehouse'
 import { productQuery } from '@/api/allocWarehouse'
 export default {
-  components: { STable, VSelect, basicInfoModal },
+  components: { STable, VSelect },
   data () {
     return {
       queryParam: {
@@ -260,7 +257,6 @@ export default {
         onShowSizeChange: (current, pageSize) => this.changeChoosePageSize(current, pageSize),
         onChange: (current) => this.changeChoosePage(current)
       },
-      openModal: false, // 选择基本信息弹框是否显示
       basicInfoData: null, //  基本信息
       productTotal: null //  合计
     }
@@ -277,6 +273,16 @@ export default {
       this.queryParam.productTypeSn3 = undefined
       this.$refs.table.refresh(true)
     },
+    // 双击快速添加
+    handleClickRow (record) {
+      return {
+        on: {
+          dblclick: (event) => {
+            this.handleAdd(record)
+          }
+        }
+      }
+    },
     // 已选产品  重置
     chooseResetSearchForm () {
       this.chooseQueryParam.productCode = ''
@@ -353,12 +359,6 @@ export default {
         }
       })
     },
-    //  编辑基本信息
-    handleEditInfo () {
-      this.openModal = true
-    },
-    //  基本信息  保存
-    handleOk () {},
     //  提交
     handleSubmit () {
       const _this = this
@@ -484,7 +484,6 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.openModal = false
       vm.getDetail()
       vm.getChooseProductList(1)
       vm.getWarehouseList()

+ 16 - 20
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -6,7 +6,6 @@
         <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <span style="margin: 0 15px;color: #666;">调出仓库:{{ (warehouse&&warehouse.outWarehouseName) || '--' }}</span>
         <span style="margin: 0 15px;color: #666;">调入仓库:{{ (warehouse&&warehouse.putWarehouseName) || '--' }}</span>
-        <!-- <a-button id="warehouseAllocationEdit-edit-btn" size="small" @click="handleEditInfo" style="margin-left:10px" key="0">编辑</a-button> -->
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -113,6 +112,7 @@
             size="small"
             :rowKey="(record) => record.id"
             :columns="columns"
+            :customRow="handleClickRow"
             :loading="loading"
             :dataSource="loadData"
             :pagination="pagination"
@@ -135,6 +135,7 @@
                 <a-select-option
                   v-for="item in warehousePutLocData"
                   :key="item.warehouseLocationSn"
+                  :disabled="item.warehouseLocationSn==record.warehouseLocationSn"
                   :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
               </a-select>
             </template>
@@ -249,7 +250,7 @@
                 allowClear
                 v-model="record.putWarehouseLocationSn"
                 style="width: 100%;">
-                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
+                <a-select-option v-for="item in warehousePutLocData" :key="item.warehouseLocationSn" :disabled="item.warehouseLocationSn==record.outWarehouseLocationSn" :value="item.warehouseLocationSn">{{ item.name }}</a-select-option>
               </a-select>
             </template>
             <!-- 调出数量 -->
@@ -289,20 +290,17 @@
           style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </div>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import basicInfoModal from './basicInfoModal.vue'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand.js'
 import { dealerProductTypeList } from '@/api/dealerProductType.js'
 import { warehouseLocAllList } from '@/api/warehouse.js'
 import { productQuery, allocWarehouseFind, allocWarehouseDetailTotal, allocWarehouseDetailQuery, allocWarehouseDetailSave, allocWarehouseDetailDelete, allocWarehouseSubmit } from '@/api/allocWarehouse.js'
 export default {
-  components: { STable, VSelect, basicInfoModal },
+  components: { STable, VSelect },
   data () {
     return {
       typeName: [], // 分类
@@ -365,7 +363,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '调出仓位', dataIndex: 'warehouseLocationSn', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出仓位', dataIndex: 'outWarehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调入仓位', dataIndex: 'putWarehouseLocationSn', width: 140, align: 'center', scopedSlots: { customRender: 'storageQuantity' } },
         { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 140, align: 'center' },
@@ -384,8 +382,7 @@ export default {
           this.disabled = false
           return data
         })
-      },
-      openModal: false // 选择基本信息弹框是否显示
+      }
     }
   },
   methods: {
@@ -411,7 +408,16 @@ export default {
       this.queryParam.warehouseLocationSn = undefined // 调出仓位
       this.getProductList()
     },
-
+    // 双击快速添加
+    handleClickRow (record) {
+      return {
+        on: {
+          dblclick: (event) => {
+            this.handleAdd(record)
+          }
+        }
+      }
+    },
     // 已选产品重置查询
     resetChooseSearchForm () {
       this.chooseParam.productCode = ''
@@ -548,14 +554,6 @@ export default {
           })
         }
       })
-    },
-    //  编辑基本信息
-    handleEditInfo () {
-      this.openModal = true
-    },
-    //  基本信息  保存
-    handleOk () {
-
     },
     //  提交
     handleSubmit () {
@@ -585,12 +583,10 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      vm.openModal = false
       vm.pageInit()
       vm.getProductBrand()
       vm.getProductType()
       vm.getHouse()
-      console.log(vm.id, vm.$route.params, 'vm.id')
     })
   }
 }