|
@@ -5,76 +5,19 @@
|
|
<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="创建时间">
|
|
|
|
- <a-range-picker
|
|
|
|
- style="width:100%"
|
|
|
|
- id="bulkWarehousingOrderList-createDate"
|
|
|
|
- :disabledDate="disabledDate"
|
|
|
|
- v-model="createDate"
|
|
|
|
- :format="dateFormat"
|
|
|
|
- :placeholder="['开始时间', '结束时间']" />
|
|
|
|
|
|
+ <a-form-item label="产品编号">
|
|
|
|
+ <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入产品编号"/>
|
|
</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-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入散件单号"/>
|
|
|
|
|
|
+ <a-form-item label="关联单号">
|
|
|
|
+ <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入关联单号"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
|
- <a-select
|
|
|
|
- id="bulkWarehousingOrderList-supplierSn"
|
|
|
|
- placeholder="请选择供应商"
|
|
|
|
- allowClear
|
|
|
|
- v-model="queryParam.supplierSn"
|
|
|
|
- :showSearch="true"
|
|
|
|
- option-filter-prop="children"
|
|
|
|
- :filter-option="filterOption">
|
|
|
|
- <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <template v-if="advanced">
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="业务状态">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.state"
|
|
|
|
- ref="state"
|
|
|
|
- id="bulkWarehousingOrderList-state"
|
|
|
|
- code="SPARE_PARTS_PURCHASE"
|
|
|
|
- placeholder="请选择业务状态"
|
|
|
|
- allowClear
|
|
|
|
- ></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-item label="财务状态">
|
|
|
|
- <v-select
|
|
|
|
- v-model="queryParam.settleState"
|
|
|
|
- ref="settleState"
|
|
|
|
- id="bulkWarehousingOrderList-settleState"
|
|
|
|
- code="FINANCIAL_PAY_STATUS"
|
|
|
|
- placeholder="请选择财务状态"
|
|
|
|
- allowClear
|
|
|
|
- ></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- </template>
|
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<span class="table-page-search-submitButtons" style="margin-top: 3px;">
|
|
<span class="table-page-search-submitButtons" style="margin-top: 3px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
|
|
- <!-- <a-button
|
|
|
|
- style="margin-left: 8px"
|
|
|
|
- type="danger"
|
|
|
|
- @click="handleExport"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- :loading="exportLoading"
|
|
|
|
- id="bulkWarehousingOrderList-export">导出</a-button> -->
|
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
|
- </a>
|
|
|
|
</span>
|
|
</span>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -83,22 +26,29 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
|
|
<a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ id="bulkWarehousingOrderList-batchAudit"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="button-warning"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ @click="handleBatchAudit"
|
|
|
|
+ style="margin: 0 15px;">批量审核</a-button>
|
|
|
|
+ <span style="margin-left: 8px">
|
|
|
|
+ <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
- <!-- alert -->
|
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
|
- <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
|
|
|
|
- </a-alert>
|
|
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="table"
|
|
ref="table"
|
|
size="default"
|
|
size="default"
|
|
|
|
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ x: 1360, y: tableHeight }"
|
|
:scroll="{ x: 1360, y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
- <!-- 散件单号 -->
|
|
|
|
|
|
+ <!-- 入库单号 -->
|
|
<template slot="sparePartsPurchaseNo" slot-scope="text, record">
|
|
<template slot="sparePartsPurchaseNo" slot-scope="text, record">
|
|
<span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
|
|
<span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -115,13 +65,6 @@
|
|
@click="handleEdit(record)"
|
|
@click="handleEdit(record)"
|
|
class="button-info"
|
|
class="button-info"
|
|
id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
|
|
id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
|
|
- <a-button
|
|
|
|
- size="small"
|
|
|
|
- type="link"
|
|
|
|
- v-if="record.state == 'WAIT_PUT_WAREHOUSE'"
|
|
|
|
- @click="handleWarehouse(record)"
|
|
|
|
- class="button-primary"
|
|
|
|
- id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
|
|
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
@@ -165,16 +108,21 @@ export default {
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '散件单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: 220, align: 'center' },
|
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
- { title: '供应商', dataIndex: 'supplierName', 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: 'stateDictValue', width: 100, align: 'center' },
|
|
|
|
- { title: '财务状态', scopedSlots: { customRender: 'settleState' }, width: 100, align: 'center' },
|
|
|
|
|
|
+ { title: '入库单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: 220, align: 'center' },
|
|
|
|
+ { title: '商户名称', dataIndex: 'supplierName', 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 || '--' } },
|
|
|
|
+ { title: '关联单号', dataIndex: 'stateDictValueNo', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '金蝶单号', dataIndex: 'stateDictValuaseNo', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '备注', dataIndex: 'remark', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
|
|
+ selectedRowKeys: [], // Check here to configure the default column
|
|
|
|
+ selectedRows: [],
|
|
|
|
+ loading: false,
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -208,11 +156,20 @@ export default {
|
|
dataTotalCount: '' // 列表数据总条数
|
|
dataTotalCount: '' // 列表数据总条数
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ hasSelected () {
|
|
|
|
+ return this.selectedRowKeys.length > 0
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 不可选日期
|
|
// 不可选日期
|
|
disabledDate (date, dateStrings) {
|
|
disabledDate (date, dateStrings) {
|
|
return date && date.valueOf() > Date.now()
|
|
return date && date.valueOf() > Date.now()
|
|
},
|
|
},
|
|
|
|
+ onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
|
+ this.selectedRowKeys = selectedRowKeys
|
|
|
|
+ this.selectedRows = selectedRows
|
|
|
|
+ },
|
|
// 合计
|
|
// 合计
|
|
getTotal (param) {
|
|
getTotal (param) {
|
|
sparePartsPurCount(param).then(res => {
|
|
sparePartsPurCount(param).then(res => {
|
|
@@ -233,32 +190,15 @@ export default {
|
|
},
|
|
},
|
|
// 基本信息 保存
|
|
// 基本信息 保存
|
|
handleOk (row) {
|
|
handleOk (row) {
|
|
- this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
|
|
|
|
+ this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
},
|
|
},
|
|
// 编辑
|
|
// 编辑
|
|
handleEdit (row) {
|
|
handleEdit (row) {
|
|
- this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/edit/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
|
|
|
|
+ this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/edit/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
- this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/detail/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
|
|
- },
|
|
|
|
- // 入库
|
|
|
|
- handleWarehouse (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确定要入库吗?',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- sparePartsPurPut({ id: row.id }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.$router.push({ path: `/purchasingManagement/bulkWarehousingOrder/detail/${row.id}/${row.sparePartsPurchaseSn}` })
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
handleDel (row) {
|
|
handleDel (row) {
|
|
@@ -286,6 +226,39 @@ export default {
|
|
this.createDate = undefined
|
|
this.createDate = undefined
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 批量审核
|
|
|
|
+ handleBatchAudit () {
|
|
|
|
+ const _this = this
|
|
|
|
+ if (_this.selectedRowKeys.length < 1) {
|
|
|
|
+ _this.$message.warning('请在列表勾选后再进行批量操作!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let num = 0
|
|
|
|
+ const obj = []
|
|
|
|
+ _this.selectedRows.map(item => {
|
|
|
|
+ if (item.state == 'WAIT') {
|
|
|
|
+ num++
|
|
|
|
+ obj.push(item.productSn)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (num < 1) {
|
|
|
|
+ _this.$message.warning('当前数据不可操作!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '已选有效数据' + num + '条,确认要批量审核吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ // productBatchAudit({ snList: obj }).then(res => {
|
|
|
|
+ // if (res.status == 200) {
|
|
|
|
+ // _this.$message.success(res.message)
|
|
|
|
+ // _this.$refs.table.refresh()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
filterOption (input, option) {
|
|
filterOption (input, option) {
|
|
return (
|
|
return (
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|