|
|
@@ -12,40 +12,40 @@
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- <u-cell title="关联类型" arrow-direction="down">
|
|
|
+ <u-cell title="关联类型" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker :readonly="!isDisable" v-model="form.associationType" slot="value" placeholder="请选择"
|
|
|
:localdata="associationTypeList" @change="associationTypeOnchange">
|
|
|
</uni-data-picker>
|
|
|
</u-cell>
|
|
|
- <u-cell title="需求名称" arrow-direction="down">
|
|
|
+ <u-cell title="需求名称" arrow-direction="down" class="required-mark-new">
|
|
|
<view slot="value" style="display: flex;align-items: center;width: 100%;">
|
|
|
<u--input style="flex:1" :disabled="!isDisable" placeholder="请输入" border="surround"
|
|
|
v-model="form.name">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- <u-cell title="客户名称" arrow-direction="down">
|
|
|
+ <u-cell title="客户名称" arrow-direction="down" class="required-mark-new">
|
|
|
<view slot="value" style="display: flex;align-items: center;width: 100%;">
|
|
|
<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
|
|
|
@click.native="selectContactShow" v-model="form.contactName">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- <u-cell v-if="form.associationType" :title="orderCodeName" arrow-direction="down">
|
|
|
+ <u-cell v-if="form.associationType" :title="orderCodeName" arrow-direction="down" class="required-mark-new">
|
|
|
<view slot="value" style="display: flex;align-items: center;width: 100%;">
|
|
|
<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
|
|
|
@click.native="invoiceDialogOpen" v-model="form.orderCode">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- <u-cell title="报修地址" arrow-direction="down">
|
|
|
+ <u-cell title="报修地址" arrow-direction="down" class="required-mark-new">
|
|
|
<view slot="value" style="display: flex;align-items: center;width: 100%;">
|
|
|
<u--input :disabled="!isDisable" style="flex:1" placeholder="请输入" border="surround"
|
|
|
v-model="form.contactAddress">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
- <u-cell title="故障等级" arrow-direction="down">
|
|
|
+ <u-cell title="故障等级" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker :readonly="!isDisable" v-model="form.faultLevel" slot="value" placeholder="请选择"
|
|
|
:localdata="fault_level" @change="sourceCodeOnchange">
|
|
|
</uni-data-picker>
|
|
|
@@ -54,12 +54,12 @@
|
|
|
<uni-datetime-picker :disabled="!isDisable" type="date" slot="value" v-model="form.expectedTime">
|
|
|
</uni-datetime-picker>
|
|
|
</u-cell>
|
|
|
- <u-cell title="售后类型" arrow-direction="down">
|
|
|
+ <u-cell title="售后类型" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker :readonly="!isDisable" v-model="form.afterSalesType" slot="value" placeholder="请选择"
|
|
|
:localdata="after_sales_type">
|
|
|
</uni-data-picker>
|
|
|
</u-cell>
|
|
|
- <u-cell title="是否收费" arrow-direction="down">
|
|
|
+ <u-cell title="是否收费" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker v-if="isDisable" v-model="form.isFee" slot="value" placeholder="请选择"
|
|
|
:localdata="chargeList">
|
|
|
</uni-data-picker>
|
|
|
@@ -69,7 +69,7 @@
|
|
|
</u--input>
|
|
|
|
|
|
</u-cell>
|
|
|
- <u-cell title="是否带配件" arrow-direction="down">
|
|
|
+ <u-cell title="是否带配件" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker v-if="isDisable" v-model="form.isWithAccessories" slot="value" placeholder="请选择"
|
|
|
:localdata="chargeList">
|
|
|
</uni-data-picker>
|
|
|
@@ -78,7 +78,7 @@
|
|
|
|
|
|
</u--input>
|
|
|
</u-cell>
|
|
|
- <u-cell title="是否派车" arrow-direction="down">
|
|
|
+ <u-cell title="是否派车" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker v-if="isDisable" v-model="form.isPieCar" slot="value" placeholder="请选择"
|
|
|
:localdata="chargeList">
|
|
|
</uni-data-picker>
|
|
|
@@ -92,11 +92,11 @@
|
|
|
:localdata="pie_car_type">
|
|
|
</uni-data-picker>
|
|
|
<u--input v-else slot="value" style="flex:1" placeholder="请输入" disabled border="surround"
|
|
|
- :value="form.pieCarType==1?'是':'否'">
|
|
|
+ :value="getTetx(form.pieCarType)">
|
|
|
|
|
|
</u--input>
|
|
|
</u-cell>
|
|
|
- <u-cell title="是否外包" arrow-direction="down">
|
|
|
+ <u-cell title="是否外包" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker v-if="isDisable" v-model="form.isOutsource" slot="value" placeholder="请选择"
|
|
|
:localdata="chargeList">
|
|
|
</uni-data-picker>
|
|
|
@@ -105,7 +105,7 @@
|
|
|
|
|
|
</u--input>
|
|
|
</u-cell>
|
|
|
- <u-cell title="是否生成采购订单" arrow-direction="down">
|
|
|
+ <u-cell title="是否生成采购订单" arrow-direction="down" class="required-mark-new">
|
|
|
<uni-data-picker v-if="isDisable" v-model="form.isCreatePurchaseOrder" slot="value" placeholder="请选择"
|
|
|
:localdata="chargeList">
|
|
|
</uni-data-picker>
|
|
|
@@ -114,18 +114,21 @@
|
|
|
|
|
|
</u--input>
|
|
|
</u-cell>
|
|
|
- <u-cell title="涉及事业部门" arrow-direction="down">
|
|
|
- <u--input slot="value" :disabled="!isDisable" placeholder="请选择" border="surround"
|
|
|
- v-model="form.involveDeptName" @click.native="salesDeptShow"></u--input>
|
|
|
+ <u-cell title="涉及事业部门" arrow-direction="down" class="required-mark-new" @click.native="salesDeptShow">
|
|
|
+ <u--input slot="value" :disabled="!isDisable" style="pointer-events: none;" placeholder="请选择"
|
|
|
+ border="surround" v-model="form.involveDeptName"></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);
|
|
|
@@ -298,6 +305,7 @@
|
|
|
el.categoryCode = el.code;
|
|
|
el.categoryName = el.name;
|
|
|
el.categoryModel = el.modelType;
|
|
|
+ el.productCategoryName = el.categoryLevelPath
|
|
|
return el;
|
|
|
});
|
|
|
let params = {
|
|
|
@@ -328,6 +336,9 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTetx(val) {
|
|
|
+ return this.pie_car_type.find(data => data.value == val)?.text
|
|
|
+ },
|
|
|
//选择部门
|
|
|
salesDeptShow() {
|
|
|
if (!this.isDisable) {
|
|
|
@@ -350,7 +361,7 @@
|
|
|
res[key].toString()
|
|
|
);
|
|
|
})
|
|
|
-
|
|
|
+ this.costListVOS = this.form.costListVOS
|
|
|
|
|
|
|
|
|
this.createUserName = data.createUserName;
|
|
|
@@ -453,6 +464,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']
|
|
|
@@ -486,6 +498,14 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!data.associationType) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "warning",
|
|
|
+ message: "请选择关联类型",
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (!data.orderCode && this.form.associationType !== '3') {
|
|
|
const message = this.form.associationType === "1" ? "请选择发货单" : "请选择销售订单"
|
|
|
this.$refs.uToast.show({
|
|
|
@@ -515,6 +535,14 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!data.involveDeptName) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "warning",
|
|
|
+ message: "请选择涉及事业部门",
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let isMessage = [];
|
|
|
[{
|
|
|
name: '请选择是否收费',
|
|
|
@@ -531,9 +559,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 +584,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;
|