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