|
@@ -6,7 +6,7 @@
|
|
|
<template slot="subTitle">
|
|
|
<a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
<span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ basicInfoData&&basicInfoData.allocateNo }}</span>
|
|
|
- <a-button type="link" class="button-default" @click="showDetail=!showDetail">
|
|
|
+ <a-button type="link" id="allocateBillEdit-showDetail" class="button-default" @click="showDetail=!showDetail">
|
|
|
<a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
|
|
|
</a-button>
|
|
|
</template>
|
|
@@ -17,7 +17,7 @@
|
|
|
type="primary"
|
|
|
class="button-info"
|
|
|
v-if="$hasPermissions('B_transferOut_print')"
|
|
|
- id="allocateBillEdit-db-print-btn"
|
|
|
+ id="allocateBillEdit-dbPrint-btn"
|
|
|
:disabled="localDataSource.length==0"
|
|
|
@click="handlePrint('dbPrint')">调拨打印</a-button>
|
|
|
<a-button
|
|
@@ -25,7 +25,7 @@
|
|
|
type="default"
|
|
|
class="button-info"
|
|
|
v-if="$hasPermissions('B_transferOutType_print')"
|
|
|
- id="allocateBillEdit-dbfl-print-btn"
|
|
|
+ id="allocateBillEdit-dbflPrint-btn"
|
|
|
:disabled="localDataSource.length==0"
|
|
|
@click="handlePrint('dbflPrint')">调拨分类打印</a-button>
|
|
|
<a-divider type="vertical" />
|
|
@@ -42,7 +42,7 @@
|
|
|
type="default"
|
|
|
class="button-info"
|
|
|
v-if="$hasPermissions('B_transferOutType_export')"
|
|
|
- id="allocateBillDetail-export-btn"
|
|
|
+ id="allocateBillDetail-exportType-btn"
|
|
|
:disabled="localDataSource.length==0"
|
|
|
@click="handlePrint('dbflExport')">调拨分类导出</a-button>
|
|
|
</template>
|
|
@@ -91,6 +91,7 @@
|
|
|
<div v-if="basicInfoData&&basicInfoData.attachmentList&&basicInfoData.attachmentList.length">
|
|
|
<a
|
|
|
target="_blank"
|
|
|
+ id="allocateBillDetail-attachmentList"
|
|
|
style="color: #00aaff;text-decoration: underline;margin-right: 15px;"
|
|
|
:href="item.filePath"
|
|
|
v-for="item in basicInfoData.attachmentList"
|
|
@@ -107,7 +108,7 @@
|
|
|
<a-card size="small" title="选择产品" :bordered="false" class="allocateBillEdit-cont">
|
|
|
<!-- 筛选条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-form layout="inline" id="allocateBillDetail-form" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
@@ -125,8 +126,8 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm(0)" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillEdit-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm(0)" :disabled="disabled" id="allocateBillEdit-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -138,7 +139,7 @@
|
|
|
size="small"
|
|
|
index="0"
|
|
|
tableId="table1"
|
|
|
- :rowKey="(record) => record.stockSn"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:customRow="handleClickRow"
|
|
|
:data="loadData"
|
|
@@ -158,6 +159,7 @@
|
|
|
<div v-else>
|
|
|
<span v-if="record.powerFlag!=0">{{ record.priceLevelDictValue }}</span>
|
|
|
<v-select
|
|
|
+ :id="'allocateBillEdit-priceLevelDictValue'+record.id"
|
|
|
v-else
|
|
|
style="width:90%;"
|
|
|
size="small"
|
|
@@ -172,6 +174,7 @@
|
|
|
<template slot="qty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
+ :id="'allocateBillEdit-qty'+record.id"
|
|
|
v-model="record.qty"
|
|
|
:precision="0"
|
|
|
:min="1"
|
|
@@ -182,6 +185,7 @@
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action1" slot-scope="text, record">
|
|
|
<a-button
|
|
|
+ :id="'allocateBillEdit-add-btn'+record.id"
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
@@ -205,21 +209,21 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :span="16">
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
+ <a-form id="allocateBillEdit-form-search" layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="9" :sm="24">
|
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
|
- <a-input id="allocateBillEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
+ <a-input id="allocateBillEdit-select-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="9" :sm="24">
|
|
|
<a-form-item label="产品名称" prop="productName">
|
|
|
- <a-input id="allocateBillEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
+ <a-input id="allocateBillEdit-select-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="chooseResetSearchForm(0)" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="allocateBillEdit-select-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="chooseResetSearchForm(0)" :disabled="chooseDisabled" id="allocateBillEdit-select-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -229,10 +233,10 @@
|
|
|
<span v-if="selNums">已选{{ selNums }}项</span>
|
|
|
<a-button
|
|
|
style="margin:0 10px;"
|
|
|
- id="salesEdit-plDel-btn"
|
|
|
+ id="allocateBillEdit-plDel-btn"
|
|
|
@click="openPlSet">批量设置费用归属</a-button>
|
|
|
<a-button id="allocateBillEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
|
|
|
- <a-button type="danger" style="margin-left: 10px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
|
|
|
+ <a-button type="danger" style="margin-left: 10px" @click.stop="handleDel('', 'all')" id="allocateBillEdit-del-all-btn">整单删除</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
<!-- 列表 -->
|
|
@@ -258,7 +262,7 @@
|
|
|
<div v-if="$route.params.dealerLevel == 'OTHER'">
|
|
|
<a-select
|
|
|
size="small"
|
|
|
- id="allocateBillEdit-price"
|
|
|
+ :id="'allocateBillEdit-select-price'+record.id"
|
|
|
option-label-prop="label"
|
|
|
v-model="record.price"
|
|
|
placeholder="请选择"
|
|
@@ -277,7 +281,7 @@
|
|
|
<template slot="qty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="allocateBillEdit-qty"
|
|
|
+ :id="'allocateBillEdit-select-qty'+record.id"
|
|
|
v-model="record.qty"
|
|
|
:precision="0"
|
|
|
:min="1"
|
|
@@ -291,6 +295,7 @@
|
|
|
<a-select
|
|
|
style="width:100%"
|
|
|
placeholder="请选择部门"
|
|
|
+ :id="'allocateBillEdit-departmentSn'+record.id"
|
|
|
size="small"
|
|
|
allowClear
|
|
|
v-model="record.departmentSn"
|
|
@@ -298,7 +303,7 @@
|
|
|
@change="e => handleChange(e, record)"
|
|
|
option-filter-prop="children"
|
|
|
:filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in departmentList" :key="item.departmentSn" :value="item.departmentSn">{{ item.name }}</a-select-option>
|
|
|
+ <a-select-option :id="'allocateBillEdit-departmentSn'+item.departmentSn" v-for="item in departmentList" :key="item.departmentSn" :value="item.departmentSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
@@ -309,7 +314,7 @@
|
|
|
class="button-error"
|
|
|
:loading="spinning"
|
|
|
@click="handleDel(record)"
|
|
|
- id="allocateBillEdit-del-btn">删除</a-button>
|
|
|
+ :id="'allocateBillEdit-del-btn'+record.id">删除</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
@@ -363,6 +368,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
@@ -370,6 +376,7 @@ import printModal from './printModal.vue'
|
|
|
import dsModal from './dsModal.vue'
|
|
|
import commonModal from '@/views/common/commonModal.vue'
|
|
|
import { printBase64Fun, exportExcel } from '@/libs/JGPrint.js'
|
|
|
+// 接口
|
|
|
import { queryStockProductForOtherPage } from '@/api/stock'
|
|
|
import { productPriceInfo } from '@/api/product'
|
|
|
import { departmentQueryList } from '@/api/expenseManagement'
|
|
@@ -382,33 +389,37 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
- showDsModal: false,
|
|
|
- editRemark: false,
|
|
|
- showPlModal: false,
|
|
|
+ showDsModal: false, // 提交调拨单弹窗
|
|
|
+ editRemark: false, // 编辑基础信息弹窗
|
|
|
+ showPlModal: false, // 批量设置部门弹窗
|
|
|
showDetail: false, // 基础信息
|
|
|
+ // 查询条件
|
|
|
queryParam: {
|
|
|
- productCode: '',
|
|
|
- productName: '',
|
|
|
- productOrigCode: ''
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '', // 产品名称
|
|
|
+ productOrigCode: ''// 原厂编码
|
|
|
},
|
|
|
+ // 已选产品查询条件
|
|
|
chooseQueryParam: {
|
|
|
- productCode: '',
|
|
|
- productName: ''
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: ''// 产品名称
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- loading: false,
|
|
|
+ loading: false, // 表格加载状态
|
|
|
chooseDisabled: false, // 查询、重置按钮是否可操作
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
departmentList: [], // 部门列表
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
+ // 获取列表数据 有分页
|
|
|
const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
|
|
|
const warehouseSn = this.basicInfoData.warehouseSn
|
|
|
const fun = this.dealerLevel == 'OTHER' ? queryStockProductForOtherPage : queryStockProductPage
|
|
|
const dealerSnInfo = this.dealerLevel != 'OTHER' ? this.basicInfoData.dealerInfo.dealerSn : undefined
|
|
|
return fun(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: dealerLevel, warehouseSn: warehouseSn, dealerSn: dealerSnInfo })).then(res => {
|
|
|
const data = res.data
|
|
|
+ // 计算表格序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -420,14 +431,16 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- loadDataSource: [],
|
|
|
- localDataSource: [],
|
|
|
+ loadDataSource: [], // 调拨列表数据
|
|
|
+ localDataSource: [], // 调拨已选数据
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
chooseLoadData: parameter => {
|
|
|
this.chooseDisabled = true
|
|
|
+ // 获取已选列表数据 有分页
|
|
|
const params = Object.assign(parameter, this.chooseQueryParam, { allocateSn: this.allocateSn })
|
|
|
return allocateBillDetailList(params).then(res => {
|
|
|
const data = res.data
|
|
|
+ // 计算表格序号
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
@@ -444,18 +457,20 @@ export default {
|
|
|
productTotal: null, // 合计
|
|
|
basicInfoData: null, // 基本信息
|
|
|
openGuideModal: false, // 导入产品引导
|
|
|
- openModal: false,
|
|
|
- nowType: null,
|
|
|
- rowSelectionInfo: null,
|
|
|
- plSetVal: undefined,
|
|
|
- dealerLevel: undefined,
|
|
|
- allocateSn: undefined
|
|
|
+ openModal: false, // 打印预览/快捷打印弹窗
|
|
|
+ nowType: null, // 打印预览/快捷打印 类型
|
|
|
+ rowSelectionInfo: null, // 已选数据集合
|
|
|
+ plSetVal: undefined, // 部门sn
|
|
|
+ dealerLevel: undefined, // 经销商等级
|
|
|
+ allocateSn: undefined// 调拨sn
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ // 计算已选产品条数
|
|
|
selNums () {
|
|
|
return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
|
|
|
},
|
|
|
+ // 表头
|
|
|
columns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
@@ -483,6 +498,7 @@ export default {
|
|
|
}
|
|
|
return arr
|
|
|
},
|
|
|
+ // 已选列表表头
|
|
|
chooseColumns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
@@ -536,10 +552,12 @@ export default {
|
|
|
this.$message.warning('请先选择产品!')
|
|
|
}
|
|
|
},
|
|
|
+ // 关闭批量设置费用归属部门弹窗
|
|
|
closePlSet () {
|
|
|
this.showPlModal = false
|
|
|
this.plSetVal = undefined
|
|
|
},
|
|
|
+ // 批量设置费用归属部门成功
|
|
|
setPlSetOk () {
|
|
|
if (!this.plSetVal) {
|
|
|
this.$message.warning('请选择费用归属部门!')
|
|
@@ -700,6 +718,7 @@ export default {
|
|
|
this.$message.warning('请选择产品')
|
|
|
}
|
|
|
},
|
|
|
+ // 提交
|
|
|
handleSubmit (params) {
|
|
|
const _this = this
|
|
|
const data = Object.assign({ allocateSn: this.$route.params.sn }, params || {})
|
|
@@ -791,6 +810,7 @@ export default {
|
|
|
_this.$store.state.app.curActionPermission = ''
|
|
|
})
|
|
|
},
|
|
|
+ // 打印导出
|
|
|
exportFl (data) {
|
|
|
this.handleExcel(data.printType, '调拨分类', data)
|
|
|
},
|
|
@@ -799,6 +819,7 @@ export default {
|
|
|
this.nowType = type
|
|
|
this.openModal = true
|
|
|
},
|
|
|
+ // 打印调拨分类、调拨 成功
|
|
|
handleOk (objs) {
|
|
|
const _this = this
|
|
|
const params = JSON.parse(JSON.stringify(objs))
|
|
@@ -828,6 +849,7 @@ export default {
|
|
|
this.$refs.chooseTable.clearSelected()
|
|
|
this.$refs.chooseTable.refresh()
|
|
|
},
|
|
|
+ // 初始化
|
|
|
pageInit () {
|
|
|
this.dealerLevel = this.$route.params.dealerLevel
|
|
|
this.allocateSn = this.$route.params.sn
|