|
|
@ -73,6 +73,7 @@ import req from '@/api/ruzhang/scmapplyinbound' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import { getPathSidByUserSid } from '@/api/cheliang/dictcommons' |
|
|
|
import divAdd from './ruzhangAdd' |
|
|
|
import divInfo from './ruzhangInfo' |
|
|
|
|
|
|
@ -115,14 +116,15 @@ export default { |
|
|
|
applicationDateEnd: '', |
|
|
|
nodeState: '', |
|
|
|
purchaseOrderNo: '', |
|
|
|
modelName: '' |
|
|
|
modelName: '', |
|
|
|
createOrgSid: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
row: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.loadList() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
@ -137,6 +139,14 @@ export default { |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
init() { |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.queryParams.params.createOrgSid = resp.data |
|
|
|
this.loadList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取数据sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
this.multipleSelection = row |
|
|
@ -150,14 +160,6 @@ export default { |
|
|
|
console.log('获取sids数组', this.sids) |
|
|
|
}, |
|
|
|
toEdit(row) { |
|
|
|
// if (this.sids.length === 0) { |
|
|
|
// this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if (this.sids.length > 1) { |
|
|
|
// this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
this.viewState = 3 |
|
|
|
const sid = row.sid |
|
|
|
this.$refs['divadd'].showEdit(sid, row) |
|
|
@ -184,10 +186,11 @@ export default { |
|
|
|
applicationDateEnd: '', |
|
|
|
nodeState: '', |
|
|
|
purchaseOrderNo: '', |
|
|
|
modelName: '' |
|
|
|
modelName: '', |
|
|
|
createOrgSid: '' |
|
|
|
} |
|
|
|
} |
|
|
|
this.dosearch() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
// 加载分页列表 |
|
|
|
loadList() { |
|
|
@ -209,45 +212,6 @@ export default { |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
doDel(row) { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'}) |
|
|
|
return |
|
|
|
} |
|
|
|
var b = false; |
|
|
|
this.multipleSelection.forEach(row => { |
|
|
|
if (!(row.nodeState === '待提交')) { |
|
|
|
b = true |
|
|
|
} |
|
|
|
}) |
|
|
|
if (b) { |
|
|
|
this.$message({showClose: true, type: 'error', message: '提交流程审批的记录不能进行删除!'}) |
|
|
|
return |
|
|
|
} |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
const _this = this |
|
|
|
req.delBySids(this.sids).then(resp => { |
|
|
|
loading.close() |
|
|
|
_this.$message({type: 'success', message: resp.msg, showClose: true}) |
|
|
|
_this.loadList() |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 子组件关闭(返回) |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|