|
@@ -66,7 +66,7 @@
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品分类">
|
|
|
- <ProductType id="productInfoList-productType" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
+ <ProductType id="bulkWarehousingOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -78,7 +78,7 @@
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin:0 30px 0 10px">
|
|
|
+ <a @click="advanced=!advanced" style="margin:0 30px 0 10px" id="bulkWarehousingOrderEdit-advanced">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
</a>
|
|
@@ -103,7 +103,7 @@
|
|
|
<div @dblclick.stop>
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="bulkWarehousingOrderEdit-putCost"
|
|
|
+ :id="'bulkWarehousingOrderEdit-putCost-'+record.id"
|
|
|
v-model="record.putCost"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
@@ -119,7 +119,7 @@
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
@dblclick.stop
|
|
|
- id="bulkWarehousingOrderEdit-putQty"
|
|
|
+ :id="'bulkWarehousingOrderEdit-putQty-'+record.id"
|
|
|
v-model="record.putQty"
|
|
|
:precision="0"
|
|
|
:min="1"
|
|
@@ -139,7 +139,7 @@
|
|
|
:allowClear="false"
|
|
|
:options="warehouseCascadeData"
|
|
|
:fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
|
|
|
- id="bulkWarehousingOrderEdit-warehouseCascade"
|
|
|
+ :id="'bulkWarehousingOrderEdit-warehouseCascade-'+record.id"
|
|
|
placeholder="请选择仓库仓位"
|
|
|
style="width: 100%;" />
|
|
|
</div>
|
|
@@ -175,17 +175,17 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="5" :sm="24">
|
|
|
<a-form-model-item label="产品编码">
|
|
|
- <a-input id="bulkWarehousingOrderEdit-code" v-model.trim="queryChooseParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-input id="chooseTable-code" v-model.trim="queryChooseParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="5" :sm="24">
|
|
|
<a-form-model-item label="产品名称">
|
|
|
- <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryChooseParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="chooseTable-name" v-model.trim="queryChooseParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="5" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="chooseTable-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="chooseTable-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
<a-col :md="3" :sm="24">
|
|
|
</a-col>
|
|
@@ -194,7 +194,7 @@
|
|
|
type="default"
|
|
|
@click="openGuideModal=true"
|
|
|
:loading="delLoading"
|
|
|
- id="bulkWarehousingOrderEdit-del-all">导入产品</a-button>
|
|
|
+ id="chooseTable-import">导入产品</a-button>
|
|
|
<a-button
|
|
|
type="primary"
|
|
|
ghost
|
|
@@ -202,7 +202,7 @@
|
|
|
style="margin-left: 10px"
|
|
|
@click="delBulkOrder"
|
|
|
:loading="delLoading"
|
|
|
- id="bulkWarehousingOrderEdit-del-all">清空列表</a-button>
|
|
|
+ id="chooseTable-del-all">清空列表</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -222,7 +222,7 @@
|
|
|
<template slot="putCost" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="bulkWarehousingOrderEdit-choose-putCost"
|
|
|
+ :id="'chooseTable-putCost-'+record.id"
|
|
|
v-model="record.putCost"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
@@ -236,7 +236,7 @@
|
|
|
<template slot="putQty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="bulkWarehousingOrderEdit-choose-putQty"
|
|
|
+ :id="'chooseTable-putQty-'+record.id"
|
|
|
v-model="record.putQty"
|
|
|
:precision="0"
|
|
|
:min="1"
|
|
@@ -255,13 +255,13 @@
|
|
|
:allowClear="false"
|
|
|
:options="warehouseCascadeData"
|
|
|
:fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
|
|
|
- id="bulkWarehousingOrderEdit-choose-warehouseCascade"
|
|
|
+ :id="'chooseTable-warehouseCascade-'+record.id"
|
|
|
placeholder="请选择仓库仓位"
|
|
|
style="width: 100%;" />
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
|
|
|
+ <a-button size="small" type="link" class="button-error" @click="handleDel(record)" :id="'chooseTable-del-'+record.id">删除</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</div>
|
|
@@ -335,28 +335,27 @@ export default {
|
|
|
data () {
|
|
|
const _this = this
|
|
|
return {
|
|
|
- isShowBisiceInfo: false,
|
|
|
- advanced: false,
|
|
|
+ isShowBisiceInfo: false, // 是否显示基础信息
|
|
|
+ advanced: false, // 展开收起
|
|
|
spinning: false,
|
|
|
loading: false,
|
|
|
- delLoading: false,
|
|
|
- chooseLoading: false,
|
|
|
- showNewProduct: false,
|
|
|
- openGuideModal: false,
|
|
|
+ delLoading: false, // 删除按钮loading
|
|
|
+ showNewProduct: false, // 新增产品弹框
|
|
|
+ openGuideModal: false, // 导入产品弹框
|
|
|
queryParam: {
|
|
|
code: '', // 产品编码
|
|
|
name: '', // 产品名称
|
|
|
origCode: '', // 原厂编码
|
|
|
- productBrandSn: undefined,
|
|
|
- productTypeSn1: undefined,
|
|
|
- productTypeSn2: undefined,
|
|
|
- productTypeSn3: undefined
|
|
|
+ productBrandSn: undefined, // 产品品牌sn
|
|
|
+ productTypeSn1: undefined, // 产品分类1sn
|
|
|
+ productTypeSn2: undefined, // 产品分类2sn
|
|
|
+ productTypeSn3: undefined // 产品分类3sn
|
|
|
},
|
|
|
queryChooseParam: {
|
|
|
productCode: '', // 产品编码
|
|
|
productName: '' // 产品名称
|
|
|
},
|
|
|
- productType: [],
|
|
|
+ productType: [], // 产品分类默认值
|
|
|
warehouseCascadeData: [], // 仓库仓位
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
paramsData: null, // 新增产品临时参数
|
|
@@ -385,6 +384,7 @@ export default {
|
|
|
data.list[i].no = no + i + 1
|
|
|
data.list[i].putCost = data.list[i].purchasePrice
|
|
|
data.list[i].putQty = data.list[i].putQty || 1
|
|
|
+ // 默认仓库仓位
|
|
|
if (this.defaultWarehouseCascade.length > 0) {
|
|
|
data.list[i].warehouseCascade = this.defaultWarehouseCascade
|
|
|
data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
|
|
@@ -434,6 +434,7 @@ export default {
|
|
|
data.list[i].no = no + i + 1
|
|
|
data.list[i].putCostBackups = data.list[i].putCost
|
|
|
data.list[i].putQtyBackups = data.list[i].putQty
|
|
|
+ // 默认仓库仓位
|
|
|
const warehouseSn = data.list[i].warehouseSn || undefined
|
|
|
const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
|
|
|
if (warehouseSn || warehouseLocationSn) {
|
|
@@ -450,8 +451,8 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- loadDataSource: [],
|
|
|
- chooseLoadDataSource: [],
|
|
|
+ loadDataSource: [], // 产品列表原始数据
|
|
|
+ chooseLoadDataSource: [], // 已选产品列表原始数据
|
|
|
warehouseList: [], // 仓库 下拉数据
|
|
|
warehouseLocList: {}, // 仓位 下拉数据
|
|
|
defaultWarehouseCascade: [], // 默认仓库仓位
|
|
@@ -680,7 +681,7 @@ export default {
|
|
|
},
|
|
|
// 返回列表
|
|
|
handleBack () {
|
|
|
- this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list' })
|
|
|
+ this.$router.push({ name: 'bulkWarehousingOrderList' })
|
|
|
},
|
|
|
// 合计
|
|
|
getDetailCount (params) {
|
|
@@ -692,6 +693,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 选择仓库仓位
|
|
|
changeWarehouseCascade (val, opt, ind, type) {
|
|
|
let loadData
|
|
|
if (type == 'dealerProduct') { // 全部产品
|
|
@@ -699,6 +701,7 @@ export default {
|
|
|
} else if (type == 'sparePartsPurDetail') { // 已选产品
|
|
|
loadData = this.chooseLoadDataSource[ind]
|
|
|
}
|
|
|
+ // 如果仓库无仓位
|
|
|
if (val.length < 2) {
|
|
|
this.$message.warning('当前仓库无仓位,请选择其他仓库')
|
|
|
const warehouseSnBackups = loadData.warehouseSnBackups || undefined
|
|
@@ -781,6 +784,7 @@ export default {
|
|
|
this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ // 页面初始化
|
|
|
initPage () {
|
|
|
this.getWarehouseCascade()
|
|
|
this.getDetail()
|