|
@@ -2,31 +2,38 @@
|
|
|
<a-card size="small" :bordered="false" class="pushOrder-wrap">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-form-model
|
|
|
+ id="allocateBillList-form"
|
|
|
+ ref="ruleForm"
|
|
|
+ class="form-model-con"
|
|
|
+ layout="inline"
|
|
|
+ :rules="rules"
|
|
|
+ :model="queryParam"
|
|
|
+ @keyup.enter.native="handleSearch">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="创建时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="创建时间" prop="time">
|
|
|
+ <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调往对象">
|
|
|
+ <a-form-model-item label="调往对象">
|
|
|
<a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="费用/调拨类型">
|
|
|
+ <a-form-model-item label="费用/调拨类型">
|
|
|
<AllocateType id="allocateBillList-costTypeName" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收货客户名称">
|
|
|
+ <a-form-model-item label="收货客户名称">
|
|
|
<dealerSearchList ref="receiverSn" @change="custChange" />
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="业务状态">
|
|
|
+ <a-form-model-item label="业务状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.state"
|
|
|
ref="state"
|
|
@@ -35,24 +42,24 @@
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear
|
|
|
></v-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调拨单号">
|
|
|
+ <a-form-model-item label="调拨单号">
|
|
|
<a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调出仓库">
|
|
|
+ <a-form-model-item label="调出仓库">
|
|
|
<warehouse
|
|
|
v-model="queryParam.warehouseSn"
|
|
|
id="allocateBillList-warehouseSn"
|
|
|
placeholder="请选择调出仓库"
|
|
|
/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="打印状态">
|
|
|
+ <a-form-model-item label="打印状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.printState"
|
|
|
ref="printState"
|
|
@@ -61,10 +68,10 @@
|
|
|
placeholder="请选择打印状态"
|
|
|
allowClear
|
|
|
></v-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="对单状态">
|
|
|
+ <a-form-model-item label="对单状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.checkStatus"
|
|
|
ref="checkStatus"
|
|
@@ -73,7 +80,7 @@
|
|
|
placeholder="请选择对单状态"
|
|
|
allowClear
|
|
|
></v-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -85,7 +92,7 @@
|
|
|
</a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- </a-form>
|
|
|
+ </a-form-model>
|
|
|
</div>
|
|
|
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
@@ -167,12 +174,13 @@ export default {
|
|
|
bizSn: null,
|
|
|
tableHeight: 0,
|
|
|
allocateTypeVal: [],
|
|
|
- time: [
|
|
|
- moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
- moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
- ],
|
|
|
+
|
|
|
// 查询参数
|
|
|
queryParam: { // 查询条件
|
|
|
+ time: [
|
|
|
+ moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
+ moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
+ ],
|
|
|
beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
|
targetName: '', // 调往对象
|
|
@@ -186,6 +194,9 @@ export default {
|
|
|
printState: undefined,
|
|
|
warehouseSn: undefined
|
|
|
},
|
|
|
+ rules: {
|
|
|
+ 'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
|
|
|
+ },
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -247,12 +258,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查询
|
|
|
handleSearch () {
|
|
|
- if (!this.queryParam.beginDate || !this.queryParam.endDate) {
|
|
|
- this.$message.error('请选择创建时间')
|
|
|
- return
|
|
|
- }
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ const _this = this
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
+ } else {
|
|
|
+ _this.$message.error('请选择创建时间')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 调拨详情
|
|
|
handleDetail (row, typeNum) {
|
|
@@ -266,8 +282,13 @@ export default {
|
|
|
},
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
+ if (date[0] && date[1]) {
|
|
|
+ this.queryParam.time = date
|
|
|
+ } else {
|
|
|
+ this.queryParam.time = []
|
|
|
+ }
|
|
|
+ this.queryParam.beginDate = date[0] || ''
|
|
|
+ this.queryParam.endDate = date[1] || ''
|
|
|
},
|
|
|
// 调拨类型
|
|
|
changeAllocatype (val, opts) {
|
|
@@ -288,9 +309,13 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.$refs.rangeDate.resetDate(this.time)
|
|
|
this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
+ this.queryParam.time = [
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ]
|
|
|
+ this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
|
this.queryParam.targetName = ''
|
|
|
this.queryParam.costTypeSn = undefined
|
|
|
this.queryParam.allocateSortSn = undefined
|