|
@@ -1,9 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<div class="storeTransferOutEdit-wrap">
|
|
<div class="storeTransferOutEdit-wrap">
|
|
- <a-page-header :ghost="false" @back="handleBack" class="storeTransferOutEdit-back">
|
|
|
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutEdit-back" >
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
- <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
|
|
|
|
|
|
+ <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
</template>
|
|
</template>
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<template slot="extra">
|
|
<template slot="extra">
|
|
@@ -17,17 +17,10 @@
|
|
<a-collapse-panel key="1">
|
|
<a-collapse-panel key="1">
|
|
<template slot="header">
|
|
<template slot="header">
|
|
基础信息
|
|
基础信息
|
|
- <a-button
|
|
|
|
- type="primary"
|
|
|
|
- shape="circle"
|
|
|
|
- size="small"
|
|
|
|
- icon="edit"
|
|
|
|
- class="edit-circle-btn"
|
|
|
|
- id="storeTransferOutEdit-circle-btn"
|
|
|
|
- @click.stop="handleEditInfo" />
|
|
|
|
|
|
+ <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="storeTransferOutEdit-circle-btn" @click.stop="handleEditInfo" /> -->
|
|
</template>
|
|
</template>
|
|
<a-descriptions :column="3">
|
|
<a-descriptions :column="3">
|
|
- <a-descriptions-item label="调往对象">箭冠营销中心</a-descriptions-item>
|
|
|
|
|
|
+ <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
|
|
</a-descriptions>
|
|
</a-descriptions>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-collapse>
|
|
@@ -41,43 +34,47 @@
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品编码" prop="name">
|
|
|
|
- <a-input id="storeTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品编码" allowClear />
|
|
|
|
|
|
+ <a-form-item label="产品编码" prop="productCode">
|
|
|
|
+ <a-input id="storeTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品名称" prop="name">
|
|
|
|
- <a-input id="storeTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品名称" allowClear />
|
|
|
|
|
|
+ <a-form-item label="产品名称" prop="productName">
|
|
|
|
+ <a-input id="storeTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="仓库">
|
|
<a-form-item label="仓库">
|
|
- <v-select
|
|
|
|
- v-model="queryParam.billStatus"
|
|
|
|
- ref="billStatus"
|
|
|
|
- id="storeTransferOutEdit-billStatus"
|
|
|
|
- code="PAYMENT_TYPE"
|
|
|
|
- placeholder="请选择仓库"
|
|
|
|
- allowClear></v-select>
|
|
|
|
|
|
+ <a-select id="storeTransferOutEdit-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-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品类别">
|
|
|
|
- <a-cascader :options="typeData" id="storeTransferOutEdit-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="storeTransferOutEdit-productType"
|
|
|
|
+ placeholder="请选择产品分类"
|
|
|
|
+ allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品品牌">
|
|
<a-form-item label="产品品牌">
|
|
<a-select
|
|
<a-select
|
|
- placeholder="请选择"
|
|
|
|
- id="storeTransferOutEdit-state"
|
|
|
|
|
|
+ placeholder="请选择产品品牌"
|
|
|
|
+ id="storeTransferOutEdit-brandSn"
|
|
allowClear
|
|
allowClear
|
|
- v-model="queryParam.dataSourceNo"
|
|
|
|
|
|
+ v-model="queryParam.brandSn"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
option-filter-prop="children"
|
|
option-filter-prop="children"
|
|
:filter-option="filterOption">
|
|
: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-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -97,15 +94,15 @@
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
- size="default"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1020 }"
|
|
|
|
|
|
+ :scroll="{ x: 1080, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
|
|
|
|
|
|
+ <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
@@ -117,27 +114,27 @@
|
|
<a-collapse-panel key="1" header="已选产品">
|
|
<a-collapse-panel key="1" header="已选产品">
|
|
<!-- 总计 -->
|
|
<!-- 总计 -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
- <div slot="message">总成本:¥<strong>6.33</strong>,总款数: <strong>6</strong> ,总数量: <strong>6</strong> </div>
|
|
|
|
|
|
+ <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
<a-row :gutter="15" justify="space-between">
|
|
<a-row :gutter="15" justify="space-between">
|
|
<a-col :span="21">
|
|
<a-col :span="21">
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="getChooseProductList(1)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="9" :sm="24">
|
|
|
|
- <a-form-item label="产品编码" prop="name">
|
|
|
|
- <a-input id="storeTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品编码" allowClear />
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品编码" prop="productCode">
|
|
|
|
+ <a-input id="storeTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="9" :sm="24">
|
|
|
|
- <a-form-item label="产品名称" prop="name">
|
|
|
|
- <a-input id="storeTransferOutEdit-name" v-model="queryParam.name" placeholder="请输入产品名称" allowClear />
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品名称" prop="productName">
|
|
|
|
+ <a-input id="storeTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 24px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 24px;">
|
|
- <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="getChooseProductList(1)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -148,30 +145,33 @@
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <s-table
|
|
|
|
|
|
+ <a-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="chooseTable"
|
|
ref="chooseTable"
|
|
- size="default"
|
|
|
|
|
|
+ size="small"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="chooseColumns"
|
|
:columns="chooseColumns"
|
|
- :data="chooseLoadData"
|
|
|
|
- :scroll="{ x: 1235 }"
|
|
|
|
|
|
+ :dataSource="chooseLoadData"
|
|
|
|
+ :scroll="{ x: 1185, y: 300 }"
|
|
|
|
+ :pagination="choosePaginationProps"
|
|
bordered>
|
|
bordered>
|
|
<!-- 调出数量 -->
|
|
<!-- 调出数量 -->
|
|
- <template slot="transferOutQuantity" slot-scope="text, record">
|
|
|
|
|
|
+ <template slot="outQty" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
- id="storeTransferOutEdit-storageQuantity"
|
|
|
|
- :value="record.storageQuantity"
|
|
|
|
|
|
+ id="storeTransferOutEdit-outQty"
|
|
|
|
+ v-model="record.outQty"
|
|
:precision="0"
|
|
:precision="0"
|
|
:min="0"
|
|
:min="0"
|
|
:max="999999"
|
|
:max="999999"
|
|
- placeholder="请输入" />
|
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ @blur="e => outQtyChange(e.target.value, record)"
|
|
|
|
+ style="width: 100%;" />
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" @click="handleDel(record)" id="storeTransferOutEdit-del-btn">删除</a-button>
|
|
|
|
|
|
+ <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="storeTransferOutEdit-del-btn">删除</a-button>
|
|
</template>
|
|
</template>
|
|
- </s-table>
|
|
|
|
|
|
+ </a-table>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-collapse>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -188,120 +188,168 @@
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
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'
|
|
|
|
+import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
|
|
+import { warehouseAllList } from '@/api/warehouse'
|
|
|
|
+import { productQuery } from '@/api/allocWarehouse'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, basicInfoModal },
|
|
components: { STable, VSelect, basicInfoModal },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
queryParam: {
|
|
queryParam: {
|
|
-
|
|
|
|
|
|
+ productCode: '',
|
|
|
|
+ productName: '',
|
|
|
|
+ warehouseSn: undefined,
|
|
|
|
+ brandSn: undefined,
|
|
|
|
+ productTypeSn1: undefined,
|
|
|
|
+ productTypeSn2: undefined,
|
|
|
|
+ productTypeSn3: undefined
|
|
|
|
+ },
|
|
|
|
+ chooseQueryParam: {
|
|
|
|
+ productCode: '',
|
|
|
|
+ productName: ''
|
|
},
|
|
},
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
+ chooseDisabled: false, // 查询、重置按钮是否可操作
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
|
+ productBrandList: [], // 产品品牌 下拉数据
|
|
|
|
+ productTypeList: [], // 产品分类 下拉数据
|
|
|
|
+ productType: [],
|
|
|
|
+ warehouseList: [], // 仓库 下拉数据
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center' },
|
|
|
|
- { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
|
|
|
|
- { title: '单位', dataIndex: 'custsNsagme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓库', dataIndex: 'custsNdame', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓位', dataIndex: 'custsNafme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '库存数量', dataIndex: 'custsNagme', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '成本价(¥)', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center' },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
|
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
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
|
|
|
|
- }
|
|
|
|
|
|
+ return productQuery(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
+ const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
- _this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
chooseColumns: [
|
|
chooseColumns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
|
|
|
|
- { title: '单位', dataIndex: 'custsNsagme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '成本价(¥)', dataIndex: 'storageQuantity', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '仓库', dataIndex: 'custsNdame', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '仓位', dataIndex: 'custsNafme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '调出数量', scopedSlots: { customRender: 'transferOutQuantity' }, width: 150, align: 'center' },
|
|
|
|
- { title: '成本小计(¥)', dataIndex: 'custsNagme', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
|
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '成本价(¥)', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 150, align: 'center' },
|
|
|
|
+ { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center' },
|
|
|
|
+ { 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
|
|
|
|
- }
|
|
|
|
- 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)
|
|
|
|
- })
|
|
|
|
|
|
+ chooseLoadData: [],
|
|
|
|
+ choosePageNo: 1, // 分页页码
|
|
|
|
+ choosePageSize: 10, // 分页 每页多少条
|
|
|
|
+ choosePaginationProps: {
|
|
|
|
+ showSizeChanger: true, // 是否可以改变 pageSize
|
|
|
|
+ total: 0, // 分页总条数
|
|
|
|
+ current: 1,
|
|
|
|
+ onShowSizeChange: (current, pageSize) => this.changeChoosePageSize(current, pageSize),
|
|
|
|
+ onChange: (current) => this.changeChoosePage(current)
|
|
},
|
|
},
|
|
- openModal: false // 选择基本信息弹框是否显示
|
|
|
|
|
|
+ openModal: false, // 选择基本信息弹框是否显示
|
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
|
+ productTotal: null // 合计
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
|
- this.queryParam.bundleName = ''
|
|
|
|
- this.queryParam.itemName = ''
|
|
|
|
- this.oldTime = undefined
|
|
|
|
- this.newTime = undefined
|
|
|
|
|
|
+ this.queryParam.productCode = ''
|
|
|
|
+ this.queryParam.productName = ''
|
|
|
|
+ this.queryParam.warehouseSn = undefined
|
|
|
|
+ this.queryParam.brandSn = undefined
|
|
|
|
+ this.queryParam.productTypeSn1 = undefined
|
|
|
|
+ this.queryParam.productTypeSn2 = undefined
|
|
|
|
+ this.queryParam.productTypeSn3 = undefined
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- // 添加
|
|
|
|
- handleAdd (row) {},
|
|
|
|
|
|
+ // 已选产品 重置
|
|
|
|
+ chooseResetSearchForm () {
|
|
|
|
+ this.chooseQueryParam.productCode = ''
|
|
|
|
+ this.chooseQueryParam.productName = ''
|
|
|
|
+ this.getChooseProductList(1)
|
|
|
|
+ },
|
|
|
|
+ // 基本信息
|
|
|
|
+ getDetail () {
|
|
|
|
+ storeCallOutDetail({ id: this.$route.params.id }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.basicInfoData = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.basicInfoData = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 添加/编辑
|
|
|
|
+ handleAdd (row, isEdit) {
|
|
|
|
+ const params = {
|
|
|
|
+ id: isEdit ? row.id : undefined,
|
|
|
|
+ storeCallOutSn: this.$route.params.sn,
|
|
|
|
+ outCost: row.putCost,
|
|
|
|
+ outQty: isEdit ? row.outQty : 1, // 添加时调出数量默认为1
|
|
|
|
+ productSn: row.productSn,
|
|
|
|
+ productCode: row.productCode,
|
|
|
|
+ productOrigCode: row.productOrigCode || undefined,
|
|
|
|
+ productTypeSn1: row.productTypeSn1,
|
|
|
|
+ productTypeSn2: row.productTypeSn2,
|
|
|
|
+ productTypeSn3: row.productTypeSn3,
|
|
|
|
+ brandSn: row.brandSn,
|
|
|
|
+ warehouseSn: row.warehouseSn,
|
|
|
|
+ warehouseLocationSn: row.warehouseLocationSn
|
|
|
|
+ }
|
|
|
|
+ storeCallOutDetailSave(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.getChooseProductList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 双击快速添加
|
|
|
|
+ handleClickRow (record) {
|
|
|
|
+ return {
|
|
|
|
+ on: {
|
|
|
|
+ dblclick: (event) => {
|
|
|
|
+ this.handleAdd(record)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 删除
|
|
// 删除
|
|
- handleDel (row) {},
|
|
|
|
|
|
+ handleDel (row) {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '删除后不可恢复,确定要进行删除吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ storeCallOutDetailDel({ id: row.id }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.getChooseProductList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 编辑基本信息
|
|
// 编辑基本信息
|
|
handleEditInfo () {
|
|
handleEditInfo () {
|
|
this.openModal = true
|
|
this.openModal = true
|
|
@@ -311,7 +359,27 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
- handleSubmit () {},
|
|
|
|
|
|
+ handleSubmit () {
|
|
|
|
+ const _this = this
|
|
|
|
+ storeCallOutSubmit({ id: this.$route.params.id }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ _this.handleBack()
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 合计
|
|
|
|
+ getDetailCount (params) {
|
|
|
|
+ storeCallOutDetailCount(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.productTotal = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.productTotal = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 导入明细
|
|
// 导入明细
|
|
handleImport () {
|
|
handleImport () {
|
|
console.log(333)
|
|
console.log(333)
|
|
@@ -320,15 +388,103 @@ export default {
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
|
|
this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
|
|
},
|
|
},
|
|
|
|
+ // 已选产品 分页 一页多少条change
|
|
|
|
+ changeChoosePageSize (current, pageSize) {
|
|
|
|
+ this.choosePageNo = current
|
|
|
|
+ this.choosePageSize = pageSize
|
|
|
|
+ this.getChooseProductList()
|
|
|
|
+ },
|
|
|
|
+ // 已选产品 分页 页码change
|
|
|
|
+ changeChoosePage (current) {
|
|
|
|
+ this.choosePageNo = current
|
|
|
|
+ this.getChooseProductList()
|
|
|
|
+ },
|
|
|
|
+ // 已选产品列表数据
|
|
|
|
+ getChooseProductList (pageNo) {
|
|
|
|
+ this.choosePageNo = this.choosePageNo || pageNo
|
|
|
|
+ this.chooseDisabled = true
|
|
|
|
+ const params = {
|
|
|
|
+ pageNo: this.choosePageNo,
|
|
|
|
+ pageSize: this.choosePageSize,
|
|
|
|
+ storeCallOutSn: this.$route.params.sn
|
|
|
|
+ }
|
|
|
|
+ storeCallOutDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ // 合计
|
|
|
|
+ this.getDetailCount(Object.assign(params, this.chooseQueryParam))
|
|
|
|
+ const data = res.data
|
|
|
|
+ this.choosePaginationProps.total = Number(res.data.count) || 0
|
|
|
|
+ this.choosePaginationProps.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
|
|
|
|
+ // 成本小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
|
|
+ data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
|
|
|
|
+ }
|
|
|
|
+ this.chooseLoadData = data.list
|
|
|
|
+ this.chooseDisabled = false
|
|
|
|
+ } else {
|
|
|
|
+ this.choosePaginationProps.total = 0
|
|
|
|
+ this.choosePaginationProps.current = 1
|
|
|
|
+ this.chooseLoadData = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 已选产品 调出数量 change
|
|
|
|
+ outQtyChange (val, record) {
|
|
|
|
+ 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 = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
filterOption (input, option) {
|
|
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
|
|
|
|
+ )
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
vm.openModal = false
|
|
vm.openModal = false
|
|
|
|
+ vm.getDetail()
|
|
|
|
+ vm.getChooseProductList(1)
|
|
|
|
+ vm.getWarehouseList()
|
|
|
|
+ vm.getProductBrand()
|
|
|
|
+ vm.getProductType()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|