Commit 361c6fc7 authored by Facius's avatar Facius

完工页面代码冲突

parent dbfb6872
...@@ -221,14 +221,10 @@ ...@@ -221,14 +221,10 @@
@value-change="fieldValueChange" @value-change="fieldValueChange"
> >
</xh-service-more> </xh-service-more>
<xh-label <xh-label v-else-if="item.formType==='label'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'>
v-else-if="item.formType === 'label'"
:groupIndex="groupIndex"
:itemIndex="itemIndex"
:item="item"
:value="form[item.fieldsName] || ''"
>
</xh-label> </xh-label>
<xh-parts ref="fileChildParts" v-else-if="item.formType==='parts'" :categoryId="categoryId" :brandId="brandId" :order-id="orderId" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""' :disabled="orderStatus === '88' || orderStatus === '86'" @value-change="fieldValueChange">
</xh-parts>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -289,6 +285,7 @@ import XhTime from "@/components/createCom/XhTime.vue"; ...@@ -289,6 +285,7 @@ import XhTime from "@/components/createCom/XhTime.vue";
import XhServiceMeasure from "@/components/createCom/XhServiceMeasure.vue"; import XhServiceMeasure from "@/components/createCom/XhServiceMeasure.vue";
import XhServiceMore from "../../components/createCom/XhServiceMore"; import XhServiceMore from "../../components/createCom/XhServiceMore";
import XhLabel from "../../components/createCom/XhLabel"; import XhLabel from "../../components/createCom/XhLabel";
import XhParts from "@/components/createCom/XhParts"
import takePhoto from "@/components/take/index.vue"; import takePhoto from "@/components/take/index.vue";
import baseFile from "@/components/upload/index"; import baseFile from "@/components/upload/index";
import Detail from "@/components/order/detail.vue"; import Detail from "@/components/order/detail.vue";
...@@ -319,6 +316,7 @@ const formType = new Map([ ...@@ -319,6 +316,7 @@ const formType = new Map([
["date", ["time", "text"]], ["date", ["time", "text"]],
["form", ["form", "text"]], ["form", ["form", "text"]],
["label", ["label", "text"]], ["label", ["label", "text"]],
['parts', ['parts','text']],
]); ]);
/** /**
...@@ -398,8 +396,10 @@ const actions = (name, pass, type, submit) => { ...@@ -398,8 +396,10 @@ const actions = (name, pass, type, submit) => {
export default { export default {
data() { data() {
return { return {
hiddenTitle: ['location', 'form', 'label', 'parts'],
orderId: 0, orderId: 0,
categoryId: 0, categoryId: 0,
brandId: 0,
orderServiceType: "", orderServiceType: "",
inGuaranteePeriod: "", inGuaranteePeriod: "",
partnerCompanyId: "", partnerCompanyId: "",
...@@ -447,6 +447,7 @@ export default { ...@@ -447,6 +447,7 @@ export default {
currentItemDate: {}, currentItemDate: {},
photoItem: {}, photoItem: {},
maintainStep: "partnerInspectItem", maintainStep: "partnerInspectItem",
orderStatus: ''
// showTab: true, // showTab: true,
}; };
}, },
...@@ -464,6 +465,7 @@ export default { ...@@ -464,6 +465,7 @@ export default {
XhServiceMeasure, XhServiceMeasure,
XhServiceMore, XhServiceMore,
XhLabel, XhLabel,
XhParts,
Detail, Detail,
"take-photo": takePhoto, "take-photo": takePhoto,
}, },
...@@ -477,11 +479,12 @@ export default { ...@@ -477,11 +479,12 @@ export default {
this.maintainStep = option.maintainStep; this.maintainStep = option.maintainStep;
this.orderId = option.orderId; this.orderId = option.orderId;
this.categoryId = option.categoryId; this.categoryId = option.categoryId;
this.brandId = option.brandId
this.orderServiceType = decodeURIComponent(option.orderServiceType); this.orderServiceType = decodeURIComponent(option.orderServiceType);
this.inGuaranteePeriod = option.inGuaranteePeriod; this.inGuaranteePeriod = option.inGuaranteePeriod;
this.partnerCompanyId = option.partnerCompanyId; this.partnerCompanyId = option.partnerCompanyId;
this.auditResultsId = option.auditResultsId; this.auditResultsId = option.auditResultsId;
this.orderStatus = option.orderStatus
// this.showTab =item.partnerCompanyName == '挚达充电桩' // this.showTab =item.partnerCompanyName == '挚达充电桩'
} else { } else {
this.orderId = 11880091; this.orderId = 11880091;
...@@ -634,11 +637,10 @@ export default { ...@@ -634,11 +637,10 @@ export default {
}); });
return param; return param;
}, },
saveComplete() { saveComplete(){// 保存完工信息
// 保存完工信息 // this.submitParts() // 不调这个接口;没完工不能调提交配件
let self = this; const param = this.handleSaveData()
let param = self.handleSaveData(); this.$u.api.saveCompleteData(param,this.orderId).then((res)=>{
self.$u.api.saveCompleteData(param, self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "保存成功", title: "保存成功",
...@@ -799,6 +801,26 @@ export default { ...@@ -799,6 +801,26 @@ export default {
if (this.oldItemId) this.itemId = this.oldItemId; if (this.oldItemId) this.itemId = this.oldItemId;
}); });
}, },
// 提交配件信息
submitParts() {
if (this.form.orderSpareParts) {
const orderSpareParts = JSON.parse(this.form.orderSpareParts)
const lists = orderSpareParts.filter(v => v.quantity > 0)
const params = {
workOrderId: this.orderId,
applyType: '10',
parts: lists ? JSON.stringify(lists) : ''
}
this.$u.api.createParts(params).then(res => {
if (res.code !== 200) {
this.$refs.uToast.show({
title: res.data,
type: 'error',
})
}
})
}
},
// 提交订单 // 提交订单
orderFinish() { orderFinish() {
const param = this.handleSaveData(); const param = this.handleSaveData();
...@@ -814,6 +836,7 @@ export default { ...@@ -814,6 +836,7 @@ export default {
if (this.inGuaranteePeriod === "Y") { if (this.inGuaranteePeriod === "Y") {
this.$u.api.inOrderFinish(this.orderId).then((res) => { this.$u.api.inOrderFinish(this.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.submitParts()
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "提交成功", title: "提交成功",
type: "success", type: "success",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment