|
@@ -3,9 +3,10 @@
|
|
|
width="75%"
|
|
width="75%"
|
|
|
:append-to-body="true"
|
|
:append-to-body="true"
|
|
|
custom-class="ele-dialog-form"
|
|
custom-class="ele-dialog-form"
|
|
|
- :title="btnName"
|
|
|
|
|
|
|
+ :title="title"
|
|
|
:visible.sync="visible"
|
|
:visible.sync="visible"
|
|
|
:maxable="true"
|
|
:maxable="true"
|
|
|
|
|
+
|
|
|
@close="handleClose"
|
|
@close="handleClose"
|
|
|
>
|
|
>
|
|
|
<header-title title="计划基本信息"></header-title>
|
|
<header-title title="计划基本信息"></header-title>
|
|
@@ -23,7 +24,6 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
:disabled="type == 'view'"
|
|
:disabled="type == 'view'"
|
|
|
-
|
|
|
|
|
disabled
|
|
disabled
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -35,7 +35,6 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
:disabled="type == 'view'"
|
|
:disabled="type == 'view'"
|
|
|
-
|
|
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -46,7 +45,6 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
:disabled="type == 'view'"
|
|
:disabled="type == 'view'"
|
|
|
-
|
|
|
|
|
>
|
|
>
|
|
|
<el-option :value="1" label="是"></el-option>
|
|
<el-option :value="1" label="是"></el-option>
|
|
|
<el-option :value="0" label="否"></el-option>
|
|
<el-option :value="0" label="否"></el-option>
|
|
@@ -65,7 +63,6 @@
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
@input="formDataDurationTime"
|
|
@input="formDataDurationTime"
|
|
|
:disabled="type == 'view'"
|
|
:disabled="type == 'view'"
|
|
|
-
|
|
|
|
|
>
|
|
>
|
|
|
<template #suffix>分钟</template>
|
|
<template #suffix>分钟</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
@@ -77,8 +74,7 @@
|
|
|
<deptSelect
|
|
<deptSelect
|
|
|
v-model="addForm.executeGroupId"
|
|
v-model="addForm.executeGroupId"
|
|
|
@changeGroup="searchDeptNodeClick"
|
|
@changeGroup="searchDeptNodeClick"
|
|
|
- :disabled="type == 'view'"
|
|
|
|
|
-
|
|
|
|
|
|
|
+ :disabled="type == 'view'&&!isDispatch"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -90,8 +86,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
filterable
|
|
filterable
|
|
|
@change="changeUser"
|
|
@change="changeUser"
|
|
|
- :disabled="type == 'view'"
|
|
|
|
|
-
|
|
|
|
|
|
|
+ :disabled="type == 'view'&&!isDispatch"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in executorList"
|
|
v-for="item in executorList"
|
|
@@ -132,12 +127,17 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<info ref="infoRef" type="view" :isPurchaseNeed="false"></info>
|
|
<info ref="infoRef" type="view" :isPurchaseNeed="false"></info>
|
|
|
|
|
|
|
|
- <header-title title="方案" ></header-title>
|
|
|
|
|
|
|
+ <header-title title="方案"></header-title>
|
|
|
<spareParts ref="sparePartsRef" :type="type"></spareParts>
|
|
<spareParts ref="sparePartsRef" :type="type"></spareParts>
|
|
|
|
|
|
|
|
- <template v-slot:footer >
|
|
|
|
|
|
|
+ <template v-slot:footer>
|
|
|
<el-button @click="handleClose">取消</el-button>
|
|
<el-button @click="handleClose">取消</el-button>
|
|
|
- <el-button type="primary" @click="save" v-if="type != 'view'"> 保存</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="save" v-if="type != 'view'">
|
|
|
|
|
+ 保存</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="primary" @click="save" v-if="isDispatch">
|
|
|
|
|
+ 确认派单</el-button
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
@@ -153,7 +153,7 @@
|
|
|
|
|
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import fileMain from '@/components/addDoc/index.vue';
|
|
import fileMain from '@/components/addDoc/index.vue';
|
|
|
- import spareParts from '../../components/sparePartsList.vue';
|
|
|
|
|
|
|
+ import spareParts from '@/views/salesServiceManagement/components/sparePartsList.vue';
|
|
|
import info from '@/views/salesServiceManagement/components/info.vue';
|
|
import info from '@/views/salesServiceManagement/components/info.vue';
|
|
|
|
|
|
|
|
import { mapGetters } from 'vuex';
|
|
import { mapGetters } from 'vuex';
|
|
@@ -195,10 +195,9 @@
|
|
|
|
|
|
|
|
// 提交状态
|
|
// 提交状态
|
|
|
loading: false,
|
|
loading: false,
|
|
|
-
|
|
|
|
|
- btnName: '',
|
|
|
|
|
- type:'add',
|
|
|
|
|
-
|
|
|
|
|
|
|
+ type: 'add',
|
|
|
|
|
+ title:'',
|
|
|
|
|
+ isDispatch: false,
|
|
|
detailList: []
|
|
detailList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -216,8 +215,10 @@
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
|
// 初始化
|
|
// 初始化
|
|
|
- async init(row, tips) {
|
|
|
|
|
- this.type = tips;
|
|
|
|
|
|
|
+ async init(row, type, isDispatch) {
|
|
|
|
|
+ this.type = type;
|
|
|
|
|
+ this.title=isDispatch?'派单':type=='view'?'详情':'修改'
|
|
|
|
|
+ this.isDispatch = isDispatch;
|
|
|
if (row) {
|
|
if (row) {
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.getInfo(row.id);
|
|
this.getInfo(row.id);
|
|
@@ -267,12 +268,13 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
save() {
|
|
save() {
|
|
|
- this.addForm.sparePartsApplyVO =
|
|
|
|
|
|
|
+ this.addForm.costListVOS =
|
|
|
this.$refs.sparePartsRef.getTableValue();
|
|
this.$refs.sparePartsRef.getTableValue();
|
|
|
this.$refs.addFormRef.validate(async (valid) => {
|
|
this.$refs.addFormRef.validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- let requestName =
|
|
|
|
|
- this.btnName == '派单' ? dispatchOrders : updateSalesPlan;
|
|
|
|
|
|
|
+ let requestName = this.isDispatch
|
|
|
|
|
+ ? dispatchOrders
|
|
|
|
|
+ : updateSalesPlan;
|
|
|
const res = await requestName(this.addForm);
|
|
const res = await requestName(this.addForm);
|
|
|
if (!res) return;
|
|
if (!res) return;
|
|
|
this.$message.success('保存成功');
|
|
this.$message.success('保存成功');
|
|
@@ -287,8 +289,9 @@
|
|
|
this.addForm = res;
|
|
this.addForm = res;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.infoRef.init(res.afterSalesDemandVO);
|
|
this.$refs.infoRef.init(res.afterSalesDemandVO);
|
|
|
|
|
+ this.$refs.sparePartsRef.setTableValue( res?.costListVOS || []);
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
- this.detailList = res?.sparePartsApplyVO || [];
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|