Compare commits
No commits in common. "2197c2a78efadc630e6161680fa549d62a411854" and "75221763a6344f76fd2c2fac305029d5f0d12932" have entirely different histories.
2197c2a78e
...
75221763a6
@ -419,12 +419,6 @@ export default {
|
|||||||
// 提交
|
// 提交
|
||||||
async handleSubmit() {
|
async handleSubmit() {
|
||||||
try {
|
try {
|
||||||
const isNull = this.validateNull();
|
|
||||||
if (!isNull) return;
|
|
||||||
const names = this.validateZero()
|
|
||||||
if (names){
|
|
||||||
await this.$modal.confirm("确认配件:" + names + "的采购价格为0吗?")
|
|
||||||
}
|
|
||||||
await this.createInit()
|
await this.createInit()
|
||||||
await createRepairSo(this.formData)
|
await createRepairSo(this.formData)
|
||||||
this.inStockDialog = false
|
this.inStockDialog = false
|
||||||
@ -463,35 +457,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})]
|
})]
|
||||||
},
|
},
|
||||||
validateNull(){
|
|
||||||
const flag = this.partList.map(item => {
|
|
||||||
const price = item.newPrice
|
|
||||||
if (price === null || price === ""){
|
|
||||||
this.$modal.msgError("配件:" + item.name + "采购价格为空")
|
|
||||||
return false
|
|
||||||
}else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let count = 0
|
|
||||||
flag.forEach(item => {
|
|
||||||
if (!item){
|
|
||||||
count++
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return count === 0
|
|
||||||
},
|
|
||||||
validateZero(){
|
|
||||||
const flag = this.partList.map(item => {
|
|
||||||
const price = parseFloat(item.newPrice)
|
|
||||||
if (price === 0){
|
|
||||||
return item.name
|
|
||||||
}else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return flag.filter(item => item !== "").join(",")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -123,16 +123,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 卡片内容 -->
|
<!-- 卡片内容 -->
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
label-width="90px">
|
|
||||||
<el-form-item label="关键字" prop="query">
|
<el-form-item label="关键字" prop="query">
|
||||||
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话"
|
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.query"/>
|
||||||
v-model="queryParams.query"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="waresStatus">
|
<el-form-item label="状态" prop="waresStatus">
|
||||||
<el-select v-model="queryParams.waresStatus">
|
<el-select v-model="queryParams.waresStatus">
|
||||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.TW_ITEM_STATUS)" :key="item.value"
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.TW_ITEM_STATUS)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
:label="item.label" :value="item.value"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -170,17 +167,7 @@
|
|||||||
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
||||||
<el-table-column label="数量" align="center" prop="waresCount" width="180"/>
|
<el-table-column label="数量" align="center" prop="waresCount" width="180"/>
|
||||||
<el-table-column v-if="userRole === 'service_advisor' && type" label="销售价格" align="center" prop="wares.price" width="180">
|
<el-table-column v-if="userRole === 'service_advisor' && type" label="折扣" align="center" prop="itemDiscount" width="180">
|
||||||
<div v-if="formData.status === '01'" class="item" slot-scope="scope">
|
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.wares.price"/>
|
|
||||||
<span class="item__txt">{{ scope.row.wares.price }}</span>
|
|
||||||
</div>
|
|
||||||
<div v-else slot-scope="scope">
|
|
||||||
<span>{{ scope.row.wares.price }}</span>
|
|
||||||
</div>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="userRole === 'service_advisor' && type" label="折扣" align="center"
|
|
||||||
prop="itemDiscount" width="180">
|
|
||||||
<!-- <div v-if="formData.status === '01'" class="item" slot-scope="scope">-->
|
<!-- <div v-if="formData.status === '01'" class="item" slot-scope="scope">-->
|
||||||
<!--<!– <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.itemDiscount"/>–>-->
|
<!--<!– <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.itemDiscount"/>–>-->
|
||||||
<!-- <DiscountInput @input-blur="save(scope.row)" class="item__input" v-model="scope.row.itemDiscount" />-->
|
<!-- <DiscountInput @input-blur="save(scope.row)" class="item__input" v-model="scope.row.itemDiscount" />-->
|
||||||
@ -199,8 +186,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div slot="footer" class="dialog-footer"
|
<div slot="footer" class="dialog-footer" v-if="info.status === '01' && (userRole === 'service_advisor' || userRole === 'general_inspection')">
|
||||||
v-if="info.status === '01' && (userRole === 'service_advisor' || userRole === 'general_inspection')">
|
|
||||||
<el-button type="primary" @click="handleAudit(true)">通 过</el-button>
|
<el-button type="primary" @click="handleAudit(true)">通 过</el-button>
|
||||||
<el-button @click="handleAudit(false)">驳 回</el-button>
|
<el-button @click="handleAudit(false)">驳 回</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -213,7 +199,6 @@ import {getTicketsById} from "@/api/repair/tickets/Tickets";
|
|||||||
import {auditTicketWares} from "@/api/repair/tickets/TicketWares";
|
import {auditTicketWares} from "@/api/repair/tickets/TicketWares";
|
||||||
import {listTwItem, updateIsShow} from "@/api/repair/tickets/TWItem";
|
import {listTwItem, updateIsShow} from "@/api/repair/tickets/TWItem";
|
||||||
import DiscountInput from "@/views/repair/tickets/Components/DiscountInput.vue";
|
import DiscountInput from "@/views/repair/tickets/Components/DiscountInput.vue";
|
||||||
import item from "@/layout/components/Sidebar/Item.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TicketWaresShow",
|
name: "TicketWaresShow",
|
||||||
@ -236,7 +221,7 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
formData: {},
|
formData: {},
|
||||||
clickCellMap: {},
|
clickCellMap: {},
|
||||||
editProp: ['wares.price'],
|
editProp: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -285,12 +270,6 @@ export default {
|
|||||||
// 审核
|
// 审核
|
||||||
async handleAudit(flag){
|
async handleAudit(flag){
|
||||||
try {
|
try {
|
||||||
const isNull = this.validateNull();
|
|
||||||
if (!isNull) return;
|
|
||||||
const names = this.validateZero()
|
|
||||||
if (names){
|
|
||||||
await this.$modal.confirm("确认配件:" + names + "的销售价格为0吗?")
|
|
||||||
}
|
|
||||||
this.formData['status'] = flag ? "02" : '05'
|
this.formData['status'] = flag ? "02" : '05'
|
||||||
// 处理配件信息
|
// 处理配件信息
|
||||||
this.formData.wares = [...this.items.map(item => {
|
this.formData.wares = [...this.items.map(item => {
|
||||||
@ -374,35 +353,6 @@ export default {
|
|||||||
})
|
})
|
||||||
this.clickCellMap[id] = []
|
this.clickCellMap[id] = []
|
||||||
},
|
},
|
||||||
validateNull(){
|
|
||||||
const flag = this.items.map(item => {
|
|
||||||
const price = item.wares.price
|
|
||||||
if (price === null || price === ""){
|
|
||||||
this.$modal.msgError("配件:" + item.waresName + "销售价格为空")
|
|
||||||
return false
|
|
||||||
}else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let count = 0
|
|
||||||
flag.forEach(item => {
|
|
||||||
if (!item){
|
|
||||||
count++
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return count === 0
|
|
||||||
},
|
|
||||||
validateZero(){
|
|
||||||
const flag = this.items.map(item => {
|
|
||||||
const price = parseFloat(item.wares.price)
|
|
||||||
if (price === 0){
|
|
||||||
return item.waresName
|
|
||||||
}else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return flag.filter(item => item !== "").join(",")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -411,7 +361,6 @@ export default {
|
|||||||
.box-card {
|
.box-card {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
.item__input {
|
.item__input {
|
||||||
display: none;
|
display: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user