|
|
|
@ -315,11 +315,20 @@ |
|
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
<span v-if="isChargeBackToCustomer()" slot="label" style="cursor: pointer" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<span v-else slot="label">CS</span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" :disabled="!isChargeBackToCustomer()" readonly style="width: 130px"> |
|
|
|
<i |
|
|
|
v-if="isChargeBackToCustomer() && dataForm.csName" |
|
|
|
slot="suffix" |
|
|
|
class="el-input__icon el-icon-circle-close" |
|
|
|
style="cursor: pointer" |
|
|
|
@click.stop="clearCsSelection"> |
|
|
|
</i> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="费用抵消"> |
|
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select> |
|
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" clearable style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
|
@ -435,8 +444,17 @@ |
|
|
|
<el-row :gutter="15" style="margin-top: 0px"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
<span v-if="isChargeBackToCustomer()" slot="label" style="cursor: pointer" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<span v-else slot="label">CS</span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" :disabled="!isChargeBackToCustomer()" readonly style="width: 130px"> |
|
|
|
<i |
|
|
|
v-if="isChargeBackToCustomer() && dataForm.csName" |
|
|
|
slot="suffix" |
|
|
|
class="el-input__icon el-icon-circle-close" |
|
|
|
style="cursor: pointer" |
|
|
|
@click.stop="clearCsSelection"> |
|
|
|
</i> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -501,12 +519,20 @@ |
|
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item required="required"> |
|
|
|
<span v-if="changeApplyHeaderFlag('cs') === 'N'" slot="label">CS</span> |
|
|
|
<span v-if="changeApplyHeaderFlag('cs') === 'N' || !isChargeBackToCustomer()" slot="label">CS</span> |
|
|
|
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" :disabled="changeApplyHeaderFlag('cs') === 'N' || !isChargeBackToCustomer()" readonly style="width: 130px"> |
|
|
|
<i |
|
|
|
v-if="changeApplyHeaderFlag('cs') !== 'N' && isChargeBackToCustomer() && dataForm.csName" |
|
|
|
slot="suffix" |
|
|
|
class="el-input__icon el-icon-circle-close" |
|
|
|
style="cursor: pointer" |
|
|
|
@click.stop="clearCsSelection"> |
|
|
|
</i> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="费用抵消"> |
|
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" :disabled="changeApplyHeaderFlag('offsetOfExpenses') === 'N'" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select> |
|
|
|
<dict-data-select v-model="dataForm.offsetOfExpenses" clearable :disabled="changeApplyHeaderFlag('offsetOfExpenses') === 'N'" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
|
@ -628,9 +654,17 @@ |
|
|
|
<el-row :gutter="15"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<span v-if="changeApplyHeaderFlag('cs') === 'N'" slot="label">CS</span> |
|
|
|
<span v-if="changeApplyHeaderFlag('cs') === 'N' || !isChargeBackToCustomer()" slot="label">CS</span> |
|
|
|
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input> |
|
|
|
<el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" :disabled="changeApplyHeaderFlag('cs') === 'N' || !isChargeBackToCustomer()" readonly style="width: 130px"> |
|
|
|
<i |
|
|
|
v-if="changeApplyHeaderFlag('cs') !== 'N' && isChargeBackToCustomer() && dataForm.csName" |
|
|
|
slot="suffix" |
|
|
|
class="el-input__icon el-icon-circle-close" |
|
|
|
style="cursor: pointer" |
|
|
|
@click.stop="clearCsSelection"> |
|
|
|
</i> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -2154,6 +2188,11 @@ export default { |
|
|
|
// |
|
|
|
// } |
|
|
|
// } |
|
|
|
'dataForm.offsetOfExpenses'(newV) { |
|
|
|
if (newV !== 'Charge Back To Customer') { |
|
|
|
this.clearCsSelection() |
|
|
|
} |
|
|
|
}, |
|
|
|
visibleU (newV, oldV) { |
|
|
|
if (newV === true){ |
|
|
|
const tryCall = () => { |
|
|
|
@ -2245,6 +2284,9 @@ export default { |
|
|
|
|
|
|
|
methods: { |
|
|
|
isAuth, |
|
|
|
isChargeBackToCustomer() { |
|
|
|
return this.dataForm.offsetOfExpenses === 'Charge Back To Customer' |
|
|
|
}, |
|
|
|
|
|
|
|
fetchNodeOptions() { |
|
|
|
getNodeList(this.searchData).then(({ data }) => { |
|
|
|
@ -2324,6 +2366,9 @@ export default { |
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList(val, type) { |
|
|
|
if (val === 2051 && !this.isChargeBackToCustomer()) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.tagNo = val |
|
|
|
this.tagNo2 = type |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -2377,6 +2422,10 @@ export default { |
|
|
|
this.$triggerInputEvent(this.$refs.purchaserName); |
|
|
|
}); |
|
|
|
} else if (this.tagNo === 2051) { |
|
|
|
if (!this.isChargeBackToCustomer()) { |
|
|
|
this.clearCsSelection() |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataForm.cs = val.username |
|
|
|
this.dataForm.csName = val.user_display |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -2384,6 +2433,10 @@ export default { |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
clearCsSelection() { |
|
|
|
this.dataForm.cs = '' |
|
|
|
this.dataForm.csName = '' |
|
|
|
}, |
|
|
|
|
|
|
|
//导出excel |
|
|
|
async createExportData() { |
|
|
|
@ -3060,6 +3113,12 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
saveData() { |
|
|
|
if (this.isChargeBackToCustomer() && !this.dataForm.cs) { |
|
|
|
this.$alert('当费用抵消为"Charge Back To Customer"时,CS必填!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataForm.detailList = this.toolData |
|
|
|
editToolApplication(this.dataForm).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
@ -3160,9 +3219,22 @@ export default { |
|
|
|
searchProjectToolApplyHeaderByAnyField(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.dataList1 = data.page.list |
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
// 加载每条记录的首条工具明细信息 |
|
|
|
this.loadToolDetailInfo() |
|
|
|
if (this.dataList1.length > 0) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0])); |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.$refs.mainTable) { |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList1[0]); |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.currentRow = {} |
|
|
|
} |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
|