更新代码
This commit is contained in:
parent
85a6461d8b
commit
0d921e70a8
@ -36,3 +36,12 @@ export function setTicketsVoid(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 结算
|
||||
export function setTicketsPaid(data){
|
||||
return request({
|
||||
url: preUrl + "/paid",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -105,12 +105,14 @@
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button v-if="TicketType === 'tu'" size="mini" type="text" icon="el-icon-finished"
|
||||
@click="handlePaid(scope.row)"
|
||||
>结算
|
||||
</el-button>
|
||||
<!-- <el-button v-if="TicketType === 'tp'" size="mini" type="text" icon="el-icon-refresh-right"-->
|
||||
<!-- >返结-->
|
||||
<!-- </el-button>-->
|
||||
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete" @click="handleVoid(scope.row)"
|
||||
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleVoid(scope.row)"
|
||||
>作废
|
||||
</el-button>
|
||||
</template>
|
||||
@ -143,7 +145,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {setTicketsVoid} from "@/api/repair/tickets/Tickets";
|
||||
import {setTicketsVoid, setTicketsPaid} from "@/api/repair/tickets/Tickets";
|
||||
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
|
||||
|
||||
export default {
|
||||
@ -183,14 +185,37 @@ export default {
|
||||
this.formData.remark = value
|
||||
this.formData.ticketsStatus = "03"
|
||||
this.doVoid()
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async doVoid() {
|
||||
try {
|
||||
await setTicketsVoid(this.formData)
|
||||
this.$modal.msgSuccess("作废成功")
|
||||
this.$emit("setVoid")
|
||||
}catch{}
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
handlePaid(row) {
|
||||
this.$prompt('结算备注', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
}).then(({value}) => {
|
||||
const data = {}
|
||||
data['id'] = row.id
|
||||
data['remark'] = value
|
||||
data['ticketsStatus'] = '02'
|
||||
this.doPaid(data)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async doPaid(data) {
|
||||
try {
|
||||
await setTicketsPaid(data)
|
||||
this.$modal.msgSuccess("结算成功")
|
||||
this.$emit("setVoid")
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,8 +113,10 @@
|
||||
<el-button size="small" @click="$refs['qualityExplain'].open()">质保说明</el-button>
|
||||
</el-col>
|
||||
<el-col v-if="createTicketType" :span="4.8">
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '1'" @click="formData.endCheck = 0">终检</el-button>
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '0'" @click="formData.endCheck = 1">不终检</el-button>
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '1'" @click="formData.endCheck = 0">终检
|
||||
</el-button>
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '0'" @click="formData.endCheck = 1">不终检
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col v-if="createTicketType" :span="4.8">
|
||||
<el-select v-model="formData.partDisposal" size="small">
|
||||
@ -134,8 +136,10 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData" ref="partTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData" ref="otherTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData"
|
||||
ref="partTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData"
|
||||
ref="otherTable"/>
|
||||
<el-row :gutter="createTicketType ? 2 : 3" style="margin-top: 1rem">
|
||||
<el-col :span="createTicketType ? 12 : 16">
|
||||
<el-descriptions class="margin-top" :column="createTicketType ? 2 : 3" border :size="'medium'"
|
||||
@ -192,7 +196,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12" style="margin-top:1rem;display: flex;justify-content: right">
|
||||
<el-button type="success" @click="handleSave">完成</el-button>
|
||||
<el-button type="danger">结算</el-button>
|
||||
<el-button type="danger" @click="handlePaid">结算</el-button>
|
||||
<!-- <el-button type="primary">通知施工</el-button>-->
|
||||
<!-- <el-button type="primary">领料</el-button>-->
|
||||
<!-- <el-button type="primary">退料</el-button>-->
|
||||
@ -347,7 +351,8 @@ export default {
|
||||
await createTickets(this.formData)
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.init()
|
||||
}catch{}finally {
|
||||
} catch {
|
||||
} finally {
|
||||
this.formData.ticketNo = null
|
||||
}
|
||||
},
|
||||
@ -491,12 +496,18 @@ export default {
|
||||
this.projectList = [itemList.find(item => item.itemType === '01')]
|
||||
this.partList = [itemList.find(item => item.itemType === '02')]
|
||||
this.otherList = [itemList.find(item => item.itemType === '03')]
|
||||
}catch{}
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
// 挂单
|
||||
handlePendingSave() {
|
||||
this.formData.ticketsStatus = "06"
|
||||
this.handleSave()
|
||||
},
|
||||
// 结算
|
||||
handlePaid() {
|
||||
this.formData.ticketsStatus = '02'
|
||||
this.handleSave()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user