rev:提交aps相关代码
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="销售订单导入"
|
||||
title="aps提交"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
@@ -13,6 +13,15 @@
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||
|
||||
|
||||
<el-form-item label="订单阶段:" prop="bill_code">
|
||||
<el-select v-model="form.bill_type" style="width: 350px;">
|
||||
<el-option label="前段" value="2"/>
|
||||
<el-option label="后段" value="3"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="日期区间:" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="form.createTime"
|
||||
@@ -22,9 +31,13 @@
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售订单号:" prop="bill_code">
|
||||
|
||||
|
||||
<!-- <el-form-item label="销售订单号:" prop="bill_code">
|
||||
<el-input v-model="form.bill_code" style="width: 350px;"/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
|
||||
</el-form>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认
|
||||
</el-button>
|
||||
@@ -35,15 +48,15 @@
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, {header, presenter} from '@crud/crud'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudSap from '@/api/wms/ext/sap'
|
||||
import crudSaleOrder from '@/views/wms/pcs/saleorder/saleOrder'
|
||||
|
||||
export default {
|
||||
name: 'importOrder',
|
||||
components: {rrOperation, pagination, DateRangePicker},
|
||||
components: { rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
@@ -57,7 +70,7 @@ export default {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
dialogVisible: false,
|
||||
form: {}
|
||||
form: { bill_type: '2' }
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -74,18 +87,37 @@ export default {
|
||||
this.$emit('tableChanged', this.rows)
|
||||
},
|
||||
queryStruct() {
|
||||
|
||||
// 校验开始日期和结束日期是否为空
|
||||
if (!this.form.createTime || !this.form.createTime[0] || !this.form.createTime[1]) {
|
||||
this.showErrorNotification('请选择日期区间')
|
||||
return
|
||||
}
|
||||
// 校验销售订单号值是否为空
|
||||
if (!this.form.bill_type) {
|
||||
this.showErrorNotification('请选择订单阶段')
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
if (this.form.createTime) {
|
||||
this.form.date_begin = this.form.createTime[0]
|
||||
this.form.date_end = this.form.createTime[1]
|
||||
}
|
||||
crudSap.getSaleOrder(this.form).then(res => {
|
||||
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
crudSaleOrder.submit(this.form).then(res => {
|
||||
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.dialogVisible = false
|
||||
this.form = {} // 清空表单数据
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
showErrorNotification: function(message) {
|
||||
this.crud.notify(message, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
this.fullscreenLoading = false
|
||||
},
|
||||
showSuccessNotification: function(message) {
|
||||
this.crud.notify(message, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user