|
@@ -48,16 +48,17 @@
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
|
+
|
|
import {
|
|
import {
|
|
- goodsAdjustPlanList,
|
|
|
|
- goodsAdjustPlanListExport,
|
|
|
|
- goodsAdjustPlanAdd,
|
|
|
|
- goodsAdjustPlanUpdate,
|
|
|
|
- goodsAdjustPlanSubmit,
|
|
|
|
- goodsAdjustPlanDetail,
|
|
|
|
- goodsAdjustPlanConfirm,
|
|
|
|
- goodsAdjustPlanDel
|
|
|
|
-} from '@/api/purchasePlanAdjustment.js'
|
|
|
|
|
|
+ goodsPlanItemList,
|
|
|
|
+ goodsPlanListExport,
|
|
|
|
+ goodsPlanAdd,
|
|
|
|
+ goodsPlanUpdate,
|
|
|
|
+ goodsPlanSubmit,
|
|
|
|
+ goodsPlanDetail,
|
|
|
|
+ goodsPlanConfirm,
|
|
|
|
+ goodsPlanDel
|
|
|
|
+} from '@/api/purchaseSchedule.js'
|
|
import form_ty from './mixins/common_form'
|
|
import form_ty from './mixins/common_form'
|
|
import storage_table from './mixins/storage_table'
|
|
import storage_table from './mixins/storage_table'
|
|
import storage_goods from './mixins/storage_goods'
|
|
import storage_goods from './mixins/storage_goods'
|
|
@@ -166,10 +167,10 @@ export default {
|
|
}),
|
|
}),
|
|
// 列表请求函数
|
|
// 列表请求函数
|
|
getList(p, cb) {
|
|
getList(p, cb) {
|
|
- return goodsAdjustPlanList(p)
|
|
|
|
|
|
+ return goodsPlanItemList(p)
|
|
},
|
|
},
|
|
// 列表导出函数
|
|
// 列表导出函数
|
|
- exportList: goodsAdjustPlanListExport,
|
|
|
|
|
|
+ exportList: goodsPlanListExport,
|
|
// 表格列解析渲染数据更改
|
|
// 表格列解析渲染数据更改
|
|
columnParsing(item, defaultData) {
|
|
columnParsing(item, defaultData) {
|
|
return defaultData
|
|
return defaultData
|
|
@@ -186,7 +187,7 @@ export default {
|
|
},
|
|
},
|
|
// 打开详情弹窗
|
|
// 打开详情弹窗
|
|
openDetailForm(row, type) {
|
|
openDetailForm(row, type) {
|
|
- goodsAdjustPlanDetail({ id: row.id }).then(res => {
|
|
|
|
|
|
+ goodsPlanDetail({ id: row.id }).then(res => {
|
|
Object.assign(this.formData, res.data, {
|
|
Object.assign(this.formData, res.data, {
|
|
fileUrl: res.data.fileUrl ? [{ url: res.data.fileUrl }] : [],
|
|
fileUrl: res.data.fileUrl ? [{ url: res.data.fileUrl }] : [],
|
|
items: res.data.items.map(item => ({ ...item, details: {} }))
|
|
items: res.data.items.map(item => ({ ...item, details: {} }))
|
|
@@ -220,7 +221,7 @@ export default {
|
|
return row.status == 'SAVE'
|
|
return row.status == 'SAVE'
|
|
},
|
|
},
|
|
click: ({ row, index, column }) => {
|
|
click: ({ row, index, column }) => {
|
|
- goodsAdjustPlanDel({
|
|
|
|
|
|
+ goodsPlanDel({
|
|
id: row.id
|
|
id: row.id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -250,7 +251,7 @@ export default {
|
|
save() {
|
|
save() {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
if (valid && this.eidtItems()) {
|
|
if (valid && this.eidtItems()) {
|
|
- goodsAdjustPlanAdd({
|
|
|
|
|
|
+ goodsPlanAdd({
|
|
...this.formData,
|
|
...this.formData,
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
@@ -268,7 +269,7 @@ export default {
|
|
save2() {
|
|
save2() {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
if (valid && this.eidtItems()) {
|
|
if (valid && this.eidtItems()) {
|
|
- goodsAdjustPlanUpdate({
|
|
|
|
|
|
+ goodsPlanUpdate({
|
|
...this.formData,
|
|
...this.formData,
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
@@ -287,12 +288,12 @@ export default {
|
|
submit() {
|
|
submit() {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
if (valid && this.eidtItems()) {
|
|
if (valid && this.eidtItems()) {
|
|
- goodsAdjustPlanUpdate({
|
|
|
|
|
|
+ goodsPlanUpdate({
|
|
...this.formData,
|
|
...this.formData,
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- goodsAdjustPlanSubmit({
|
|
|
|
|
|
+ goodsPlanSubmit({
|
|
id: this.formData.id
|
|
id: this.formData.id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -308,7 +309,7 @@ export default {
|
|
},
|
|
},
|
|
// 审核
|
|
// 审核
|
|
examine(type) {
|
|
examine(type) {
|
|
- goodsAdjustPlanConfirm({
|
|
|
|
|
|
+ goodsPlanConfirm({
|
|
id: this.formData.id,
|
|
id: this.formData.id,
|
|
statusEnum: type
|
|
statusEnum: type
|
|
}).then(res => {
|
|
}).then(res => {
|