{
+ return (
+
+
+ {row.supply || '-'}
+
+ {
+ e.stopPropagation()
+ this.openSupplyDialog(row)
+ }}
+ />
+
+ )
+ }
},
{
label: '业务科室',
@@ -1780,7 +1817,9 @@ export default {
flowId: '', // 流水号
flowStatus: 0, // 流程状态: 0流转中, 1已办结
oatoken: '', // OA token
-
+ isShowSupplyDialog: false, // 编辑供应商弹窗
+ editingSupplyRow: null, // 正在编辑的行数据
+ editingSupplyValue: '', // 编辑中的供应商值
isShowEditor: false,
contractTypes: [
{ label: '设备采购', value: 'equipment' },
@@ -2688,6 +2727,46 @@ export default {
this.flowId = ''
this.flowStatus = 0
},
+ // 打开编辑供应商弹窗
+ openSupplyDialog(row) {
+ this.editingSupplyRow = row
+ this.editingSupplyValue = row.supply || ''
+ this.isShowSupplyDialog = true
+ },
+ // 取消编辑供应商弹窗
+ cancelSupplyDialog() {
+ this.isShowSupplyDialog = false
+ this.editingSupplyRow = null
+ this.editingSupplyValue = ''
+ },
+ // 提交供应商信息
+ async submitSupply() {
+ if (!this.editingSupplyRow || !this.editingSupplyRow.id) {
+ return
+ }
+ try {
+ await editorContract({
+ id: this.editingSupplyRow.id,
+ supply: this.editingSupplyValue || ''
+ })
+ Message({
+ type: 'success',
+ message: '保存成功'
+ })
+ // 更新行数据
+ this.editingSupplyRow.supply = this.editingSupplyValue
+ // 关闭弹窗
+ this.cancelSupplyDialog()
+ // 刷新列表
+ this.getContracts()
+ } catch (error) {
+ console.error('保存供应商失败:', error)
+ Message({
+ type: 'error',
+ message: '保存失败,请重试'
+ })
+ }
+ },
// 提交OA流程流水号
async submitFlowId() {
if (!this.flowId || !this.flowId.trim()) {