|
|
@@ -119,13 +119,16 @@
|
|
|
v-model="form.involveDeptName" @click.native="salesDeptShow"></u--input>
|
|
|
</u-cell>
|
|
|
<u-cell title="备注说明" arrow-direction="down">
|
|
|
- <u--textarea border="surround" :disabled="!isDisable" placeholder=" " slot="value" v-model="form.remark" autoHeight ></u--textarea>
|
|
|
+ <u--textarea border="surround" :disabled="!isDisable" placeholder=" " slot="value" v-model="form.remark"
|
|
|
+ autoHeight></u--textarea>
|
|
|
</u-cell>
|
|
|
</u-cell-group>
|
|
|
<AfterSales ref="salesRef" :type="type" v-show="current == 1" :afterSalesType="form.afterSalesType"
|
|
|
:itemList="form.productDetail" />
|
|
|
+ <!-- 方案列表 -->
|
|
|
+ <SchemeList ref="schemeRef" v-show="current == 2" :type='type' :itemList="costListVOS" />
|
|
|
<!-- 联系人 -->
|
|
|
- <ContactList ref="contactRef" :type="type" v-show="current == 2" :itemList="form.contactInfoVOS" />
|
|
|
+ <ContactList ref="contactRef" :type="type" v-show="current == 3" :itemList="form.contactInfoVOS" />
|
|
|
<view class="footerButton" v-if="isDisable">
|
|
|
<u-button type="default" text="返回" @click="back"></u-button>
|
|
|
<u-button type="primary" @click="save" text="保存"></u-button>
|
|
|
@@ -153,6 +156,7 @@
|
|
|
} from '@/api/salesServiceManagement/demandList/index.js'
|
|
|
import AfterSales from './components/AfterSales.vue'
|
|
|
import ContactList from './components/contactList.vue'
|
|
|
+ import SchemeList from '@/pages/salesServiceManagement/workOrder/components/schemeList.vue';
|
|
|
import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
|
import {
|
|
|
listOrganizations,
|
|
|
@@ -160,7 +164,8 @@
|
|
|
export default {
|
|
|
components: {
|
|
|
AfterSales,
|
|
|
- ContactList
|
|
|
+ ContactList,
|
|
|
+ SchemeList
|
|
|
},
|
|
|
computed: {
|
|
|
isDisable() {
|
|
|
@@ -199,6 +204,7 @@
|
|
|
remark: '',
|
|
|
processInstanceId: '' // 新增流程实例ID字段
|
|
|
},
|
|
|
+ costListVOS: [],
|
|
|
associationTypeList: [{
|
|
|
value: '1',
|
|
|
text: '发货单'
|
|
|
@@ -213,7 +219,7 @@
|
|
|
}
|
|
|
],
|
|
|
createUserName: '',
|
|
|
- list: ['基本信息', '售后对象', '联系人'],
|
|
|
+ list: ['基本信息', '售后对象', '方案', '联系人'],
|
|
|
current: 0,
|
|
|
fault_level: [],
|
|
|
after_sales_type: [],
|
|
|
@@ -255,6 +261,7 @@
|
|
|
},
|
|
|
onLoad(params) {
|
|
|
this.type = params.type;
|
|
|
+ console.log(params.type, 'params.type')
|
|
|
if (params.id) {
|
|
|
this.title = params.type == 'view' ? '需求详情' : '修改需求'
|
|
|
this.getDetails(params.id);
|
|
|
@@ -350,7 +357,7 @@
|
|
|
res[key].toString()
|
|
|
);
|
|
|
})
|
|
|
-
|
|
|
+ this.costListVOS = this.form.costListVOS
|
|
|
|
|
|
|
|
|
this.createUserName = data.createUserName;
|
|
|
@@ -453,6 +460,7 @@
|
|
|
confirm(data, name) {
|
|
|
this.form.involveDeptName = name || ''
|
|
|
this.form.involveDeptId = data[0] || ''
|
|
|
+ console.log(this.form, 'this.form')
|
|
|
},
|
|
|
getByCode() {
|
|
|
const codeS = ['fault_level', 'after_sales_type', 'pie_car_type']
|
|
|
@@ -515,6 +523,14 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!data.involveDeptName) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "warning",
|
|
|
+ message: "请选择涉及事业部门",
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let isMessage = [];
|
|
|
[{
|
|
|
name: '请选择是否收费',
|
|
|
@@ -531,9 +547,6 @@
|
|
|
}, {
|
|
|
name: '请选择是否生成采购订单',
|
|
|
key: 'isCreatePurchaseOrder'
|
|
|
- }, {
|
|
|
- name: '请选择涉及事业部门',
|
|
|
- key: 'involveDeptName'
|
|
|
}].forEach(item => {
|
|
|
if (data[item.key] != 1 && data[item.key] !== 0 && !isMessage.length) {
|
|
|
console.log(item, 'item')
|
|
|
@@ -559,17 +572,18 @@
|
|
|
this.current = 2
|
|
|
return
|
|
|
}
|
|
|
- data.contactInfoVOS = contactInfoVOS;
|
|
|
+ data.contactInfoVOS = this.$refs.contactRef.getTabData();
|
|
|
// 售后对象数据
|
|
|
let productDetail = this.$refs.salesRef.getTabData();
|
|
|
data.productDetail = productDetail.map((item) => {
|
|
|
- item['produceTime'] = item['produceTime'] || null;
|
|
|
- return item;
|
|
|
- }),
|
|
|
+ item['produceTime'] = item['produceTime'] || null;
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ data.costListVOS = this.$refs.schemeRef.getTabData()
|
|
|
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
- })
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
|
|
|
let requestname =
|
|
|
this.type === 'add' ? saveSalesDemand : updateSalesDemand;
|