|
@@ -14,17 +14,19 @@
|
|
|
:format="dateFormat"
|
|
|
:placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-item>
|
|
|
- </a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="调出对象">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.outTenantName"
|
|
|
- ref="outTenantName"
|
|
|
- id="chainTransferInList-outTenantName"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
+ <a-select
|
|
|
placeholder="请选择调出对象"
|
|
|
- allowClear></v-select>
|
|
|
+ allowClear
|
|
|
+ id="chainTransferInList-putTenantSn"
|
|
|
+ v-model="queryParam.putTenantSn"
|
|
|
+ :showSearch="true"
|
|
|
+ option-filter-prop="children"
|
|
|
+ :filter-option="filterOption">
|
|
|
+ <a-select-option v-for="item in putTenantSnData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -33,20 +35,20 @@
|
|
|
v-model="queryParam.allocationType"
|
|
|
ref="allocationType"
|
|
|
id="chainTransferInList-allocationType"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
+ code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
|
|
|
placeholder="请选择调拨产品类型"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="单据状态">
|
|
|
+ <a-form-item label="业务状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.state"
|
|
|
ref="state"
|
|
|
id="chainTransferInList-state"
|
|
|
code="PAYMENT_TYPE"
|
|
|
- placeholder="请选择单据状态"
|
|
|
+ placeholder="请选择业务状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -70,29 +72,26 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1595 }"
|
|
|
+ :scroll="{ x: 1850 }"
|
|
|
bordered>
|
|
|
- <!-- 状态 -->
|
|
|
- <template slot="state" slot-scope="text, record">
|
|
|
- <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '待入库': '待审核' }}</a-tag>
|
|
|
+ <!-- 连锁调入单号 -->
|
|
|
+ <template slot="allocationLinkagePutNo" slot-scope="text, record">
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button size="small" type="link" class="button-primary" @click="handleWarehousing(record)" id="chainTransferInList-warehousing-btn">入库</a-button>
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
<a-button size="small" type="link" class="button-warning" @click="handleExamine(record)" id="chainTransferInList-examine-btn">审核</a-button>
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
<a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="chainTransferInList-edit-btn">编辑</a-button>
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
- <a-button size="small" type="link" @click="handleDetail(record)" id="chainTransferInList-detail-btn">详情</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { allocLinkagePutList } from '@/api/allocLinkagePut'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import { allocLinkagePutList, allocLinkagePutAudit, allocLinkagePutSubmit } from '@/api/allocLinkagePut'
|
|
|
+import { getTenantList } from '@/api/allocLinkageOut'
|
|
|
export default {
|
|
|
components: { STable, VSelect },
|
|
|
data () {
|
|
@@ -102,23 +101,24 @@ export default {
|
|
|
queryParam: { // 查询条件
|
|
|
outTenantName: undefined, // 调出对象
|
|
|
allocationType: undefined, // 调拨产品类型
|
|
|
- state: undefined // 单据状态
|
|
|
+ state: undefined // 业务状态
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
|
- { title: '连锁调出单号', dataIndex: 'productName', width: 140, align: 'center' },
|
|
|
- { title: '店内单号', dataIndex: 'allocationLinkagePutNo', width: 140, align: 'center' },
|
|
|
- { title: '调出对象', dataIndex: 'outTenantName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: 220, align: 'center' },
|
|
|
+ { title: '店内单号', dataIndex: 'allocatiosnLinkagePutNo', width: 200, align: 'center' },
|
|
|
+ { title: '调出对象', dataIndex: 'outTenantName', 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: 'putWarehouseTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调拨产品类型', dataIndex: 'allocationType', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '状态', scopedSlots: { customRender: 'state' }, width: 100, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 215, align: 'center', fixed: 'right' }
|
|
|
+ { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center' },
|
|
|
+ { title: '财务状态', dataIndex: 'settleStateDictValue', width: 100, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -134,8 +134,7 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- openModal: false, // 新增编辑产品品牌 弹框
|
|
|
- itemId: '' // 当前品牌id
|
|
|
+ putTenantSnData: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -152,39 +151,71 @@ export default {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 入库
|
|
|
- handleWarehousing () {},
|
|
|
+ handleWarehousing (row) {
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认要入库吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ allocLinkagePutSubmit({ sn: row.allocationLinkagePutSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 审核
|
|
|
- handleExamine () {
|
|
|
+ handleExamine (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
content: '确认要审核通过吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
- // delectRolePower({
|
|
|
- // id: row.id
|
|
|
- // }).then(res => {
|
|
|
- // console.log(res, 'res1111')
|
|
|
- // if (res.status == 200) {
|
|
|
- // _this.$message.success(res.message)
|
|
|
- // _this.$refs.table.refresh()
|
|
|
- // }
|
|
|
- // })
|
|
|
+ allocLinkagePutAudit({ sn: row.allocationLinkagePutSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
- this.$router.push({ path: `/allocationManagement/chainTransferIn/detail/${row.id}/${row.allocationLinkagePutSn}` })
|
|
|
+ this.$router.push({ path: `/allocationManagement/chainTransferIn/detail/${row.allocationLinkagePutSn}` })
|
|
|
},
|
|
|
// 新增/编辑
|
|
|
handleEdit (row) {
|
|
|
if (row) { // 编辑
|
|
|
- this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${row.id}` })
|
|
|
+ this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${row.id}/${row.allocationLinkagePutSn}` })
|
|
|
} else { // 新增
|
|
|
this.$router.push({ path: '/allocationManagement/chainTransferIn/add' })
|
|
|
}
|
|
|
+ },
|
|
|
+ // 调出对象
|
|
|
+ getPutTenantList () {
|
|
|
+ getTenantList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.putTenantSnData = res.data
|
|
|
+ } else {
|
|
|
+ this.putTenantSnData = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ filterOption (input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.getPutTenantList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|