|
@@ -1,9 +1,10 @@
|
|
|
<template>
|
|
|
<div class="chainTransferOutEdit-wrap">
|
|
|
- <a-page-header :ghost="false" @back="handleBack" class="chainTransferOutEdit-back">
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutEdit-back" >
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
- <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
+ <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
+ <span style="margin: 0 15px;color: #666;">调往对象:{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</span>
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra">
|
|
@@ -11,27 +12,6 @@
|
|
|
<a-button key="1" type="primary" id="chainTransferOutEdit-print-btn">快速打印</a-button>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
- <!-- 基础信息 -->
|
|
|
- <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1">
|
|
|
- <template slot="header">
|
|
|
- 基础信息
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- shape="circle"
|
|
|
- size="small"
|
|
|
- icon="edit"
|
|
|
- class="edit-circle-btn"
|
|
|
- id="chainTransferOutEdit-circle-btn"
|
|
|
- @click.stop="handleEditInfo" />
|
|
|
- </template>
|
|
|
- <a-descriptions :column="3">
|
|
|
- <a-descriptions-item label="调往对象">箭冠营销中心</a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </a-card>
|
|
|
<!-- 选择产品 -->
|
|
|
<a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
|
|
|
<a-collapse :activeKey="['1']">
|
|
@@ -41,18 +21,18 @@
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品编码" prop="name">
|
|
|
- <a-input id="chainTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品编码" allowClear />
|
|
|
+ <a-form-item label="产品编码" prop="productCode">
|
|
|
+ <a-input id="chainTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称" prop="name">
|
|
|
- <a-input id="chainTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品名称" allowClear />
|
|
|
+ <a-form-item label="产品名称" prop="productName">
|
|
|
+ <a-input id="chainTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="原厂编码" prop="name">
|
|
|
- <a-input id="chainTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入原厂编码" allowClear />
|
|
|
+ <a-form-item label="原厂编码" prop="productOrigCode">
|
|
|
+ <a-input id="chainTransferOutEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
@@ -60,30 +40,34 @@
|
|
|
<a-form-item label="产品品牌">
|
|
|
<a-select
|
|
|
placeholder="请选择"
|
|
|
- id="chainTransferOutEdit-state"
|
|
|
+ id="chainTransferOutEdit-brandSn"
|
|
|
allowClear
|
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
+ v-model="queryParam.brandSn"
|
|
|
:showSearch="true"
|
|
|
option-filter-prop="children"
|
|
|
:filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品类别">
|
|
|
- <a-cascader :options="typeData" id="chainTransferOutEdit-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
|
|
|
+ <a-form-item label="产品分类">
|
|
|
+ <a-cascader
|
|
|
+ @change="changeProductType"
|
|
|
+ change-on-select
|
|
|
+ v-model="productType"
|
|
|
+ :options="productTypeList"
|
|
|
+ :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
|
+ id="chainTransferOutEdit-productType"
|
|
|
+ placeholder="请选择产品分类"
|
|
|
+ allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="仓库">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- ref="billStatus"
|
|
|
- id="chainTransferOutEdit-billStatus"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
- placeholder="请选择仓库"
|
|
|
- allowClear></v-select>
|
|
|
+ <a-select id="chainTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -99,30 +83,31 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
- <s-table
|
|
|
+ <a-table
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
- size="default"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
|
|
|
:columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ x: 1530 }"
|
|
|
+ :dataSource="loadData"
|
|
|
+ :scroll="{ x: 1610, y: 300 }"
|
|
|
bordered>
|
|
|
<!-- 调出数量 -->
|
|
|
- <template slot="transferOutQuantity" slot-scope="text, record">
|
|
|
+ <template slot="outQty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
- id="chainTransferOutEdit-storageQuantity"
|
|
|
- :value="record.storageQuantity"
|
|
|
+ id="chainTransferOutEdit-outQty"
|
|
|
+ v-model="record.outQty"
|
|
|
:precision="0"
|
|
|
- :min="0"
|
|
|
+ :min="1"
|
|
|
:max="999999"
|
|
|
- placeholder="请输入" />
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button size="small" type="link" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
|
|
|
</template>
|
|
|
- </s-table>
|
|
|
+ </a-table>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
|
</a-card>
|
|
@@ -167,22 +152,12 @@
|
|
|
<s-table
|
|
|
class="sTable"
|
|
|
ref="chooseTable"
|
|
|
- size="default"
|
|
|
+ size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="chooseColumns"
|
|
|
:data="chooseLoadData"
|
|
|
- :scroll="{ x: 1545 }"
|
|
|
+ :scroll="{ x: 1545, y: 300 }"
|
|
|
bordered>
|
|
|
- <!-- 调出数量 -->
|
|
|
- <template slot="transferOutQuantity" slot-scope="text, record">
|
|
|
- <a-input-number
|
|
|
- id="chainTransferOutEdit-storageQuantity"
|
|
|
- :value="record.storageQuantity"
|
|
|
- :precision="0"
|
|
|
- :min="0"
|
|
|
- :max="999999"
|
|
|
- placeholder="请输入" />
|
|
|
- </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button size="small" type="link" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
|
|
@@ -193,7 +168,13 @@
|
|
|
</a-card>
|
|
|
<a-affix :offset-bottom="0">
|
|
|
<div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
|
|
|
- <a-button type="primary" id="chainTransferOutEdit-submit" size="large" class="button-primary" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ id="chainTransferOutEdit-submit"
|
|
|
+ size="large"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleSubmit"
|
|
|
+ style="padding: 0 60px;">提交</a-button>
|
|
|
</div>
|
|
|
</a-affix>
|
|
|
<!-- 选择基本信息弹框 -->
|
|
@@ -204,61 +185,59 @@
|
|
|
<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 },
|
|
|
data () {
|
|
|
return {
|
|
|
queryParam: {
|
|
|
-
|
|
|
+ productCode: '',
|
|
|
+ productName: '',
|
|
|
+ productOrigCode: '',
|
|
|
+ warehouseSn: undefined,
|
|
|
+ brandSn: undefined,
|
|
|
+ productTypeSn1: undefined,
|
|
|
+ productTypeSn2: undefined,
|
|
|
+ productTypeSn3: undefined
|
|
|
},
|
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
+ productBrandList: [], // 产品品牌 下拉数据
|
|
|
+ productTypeList: [], // 产品分类 下拉数据
|
|
|
+ productType: [],
|
|
|
+ warehouseList: [], // 仓库 下拉数据
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center' },
|
|
|
- { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '品牌', dataIndex: 'custsNsame', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓库', dataIndex: 'custsNdame', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓位', dataIndex: 'custsNafme', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价(¥)', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '库存数量', dataIndex: 'custsNagme', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '单位', dataIndex: 'custsNsagme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 150, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center' },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 150, align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
- }
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
- })
|
|
|
+ loadData: [],
|
|
|
+ pageNo: 1, // 分页页码
|
|
|
+ pageSize: 10, // 分页 每页多少条
|
|
|
+ paginationProps: {
|
|
|
+ showSizeChanger: true, // 是否可以改变 pageSize
|
|
|
+ total: 0, // 分页总条数
|
|
|
+ current: 1,
|
|
|
+ onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize),
|
|
|
+ onChange: (current) => this.changePage(current)
|
|
|
+ },
|
|
|
+ chooseQueryParam: {
|
|
|
+ productCode: '',
|
|
|
+ productName: ''
|
|
|
},
|
|
|
// 表头
|
|
|
chooseColumns: [
|
|
@@ -271,41 +250,26 @@ export default {
|
|
|
{ title: '仓位', dataIndex: 'custsNafme', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '成本价(¥)', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '单位', dataIndex: 'custsNsagme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 150, align: 'center' },
|
|
|
+ { title: '调出数量', dataIndex: 'outQty', width: 150, align: 'center' },
|
|
|
{ title: '成本小计(¥)', dataIndex: 'custsNagme', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
chooseLoadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).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
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ return allocLinkageOutDetailList(Object.assign(parameter, this.chooseQueryParam, { allocationLinkageOutSn: this.$route.params.sn })).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
|
|
|
}
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
})
|
|
|
},
|
|
|
- openModal: false // 选择基本信息弹框是否显示
|
|
|
+ openModal: false, // 选择基本信息弹框是否显示
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
+ productTotal: null // 合计
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -319,6 +283,16 @@ export default {
|
|
|
this.newTime = undefined
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
+ // 基本信息
|
|
|
+ getDetail () {
|
|
|
+ allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.basicInfoData = res.data
|
|
|
+ } else {
|
|
|
+ this.basicInfoData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 添加
|
|
|
handleAdd (row) {},
|
|
|
// 删除
|
|
@@ -342,14 +316,87 @@ export default {
|
|
|
this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
|
|
|
},
|
|
|
filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
+ },
|
|
|
+ // 产品列表数据
|
|
|
+ getProductList (pageNo) {
|
|
|
+ this.disabled = true
|
|
|
+ this.pageNo = pageNo || this.pageNo
|
|
|
+ const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
|
+ productQuery(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ const data = res.data
|
|
|
+ console.log(data)
|
|
|
+ this.paginationProps.total = Number(res.data.count) || 0
|
|
|
+ this.paginationProps.current = data.pageNo
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.loadData = data.list
|
|
|
+ this.disabled = false
|
|
|
+ } else {
|
|
|
+ this.paginationProps.total = 0
|
|
|
+ this.paginationProps.current = 1
|
|
|
+ this.loadData = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 已选产品 调出数量 blur
|
|
|
+ outQtyBlur (val, record) {
|
|
|
+ // 光标移出,值发生改变再调用编辑接口
|
|
|
+ if (val != record.outQtyBackups) {
|
|
|
+ this.handleAdd(record, 'edit')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 产品分类 change
|
|
|
+ changeProductType (val, opt) {
|
|
|
+ this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
+ this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
+ this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
+ },
|
|
|
+ // 产品品牌 列表
|
|
|
+ getProductBrand () {
|
|
|
+ // sysFlag不传,此处应查询所有产品
|
|
|
+ dealerProductBrandQuery({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productBrandList = res.data
|
|
|
+ } else {
|
|
|
+ this.productBrandList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 产品分类 列表
|
|
|
+ getProductType () {
|
|
|
+ dealerProductTypeList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productTypeList = res.data
|
|
|
+ } else {
|
|
|
+ this.productTypeList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 仓库下拉数据
|
|
|
+ getWarehouseList (type) {
|
|
|
+ warehouseAllList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.warehouseList = res.data
|
|
|
+ } else {
|
|
|
+ this.warehouseList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.openModal = false
|
|
|
+ vm.getDetail()
|
|
|
+ vm.getProductList(1)
|
|
|
+ vm.getWarehouseList()
|
|
|
+ vm.getProductBrand()
|
|
|
+ vm.getProductType()
|
|
|
})
|
|
|
}
|
|
|
}
|