|
|
@@ -93,7 +93,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ // console.log(options)
|
|
|
this.info = JSON.parse(decodeURIComponent(options.info))
|
|
|
+ // console.log(this.info.goodsList)
|
|
|
this.worker = this.info.maintenancerName || ''
|
|
|
this.phone = this.info.maintenancerPhone || ''
|
|
|
if (options.type) {
|
|
|
@@ -151,6 +153,11 @@ export default {
|
|
|
success: async (res) => {
|
|
|
if (res.confirm) {
|
|
|
if (this.type) {
|
|
|
+ this.goodList.forEach((ele) => {
|
|
|
+ if (ele.new) {
|
|
|
+ ele.id = null
|
|
|
+ }
|
|
|
+ })
|
|
|
const res = await this.$myRequest_repairs({
|
|
|
url: '/repairConsumables/changeMaintenanceConsumables',
|
|
|
method: 'post',
|
|
|
@@ -201,6 +208,7 @@ export default {
|
|
|
},
|
|
|
// 全局自定义事件
|
|
|
addConsumable(e) {
|
|
|
+ // console.log(e)
|
|
|
// 判断是否存在相同的耗材
|
|
|
let flag = this.goodList.some((ele) => {
|
|
|
return ele.consumeName === e.data.name
|
|
|
@@ -211,6 +219,8 @@ export default {
|
|
|
this.$set(e.data, 'consumeName', e.data.name)
|
|
|
this.$set(e.data, 'consumeId', e.data.id)
|
|
|
this.$set(e.data, 'articleId', e.articleId)
|
|
|
+ // 添加标识
|
|
|
+ this.$set(e.data, 'new', true)
|
|
|
// this.$delete(e.data, 'name')
|
|
|
// this.$delete(e.data, 'id')
|
|
|
this.goodList.push(e.data)
|