diff --git a/src/api/purchase/goodsArrived.js b/src/api/purchase/goodsArrived.js index 4d213d1a..96c89b8f 100644 --- a/src/api/purchase/goodsArrived.js +++ b/src/api/purchase/goodsArrived.js @@ -45,13 +45,7 @@ export function getNoticePeople(query) { }) } -// 通知人员--删除 -export function delPeople(ids) { - return request({ - url: '/material/purchase_notice_person/' + ids, - method: 'delete', - }) -} + // 人员管理--新增 export function addNoticeUser(data) { @@ -79,6 +73,13 @@ export function getListUnSelected() { method: 'get', }) } +// 通知人员--删除 +export function delPeople(ids) { + return request({ + url: '/material/purchase_notice_person/' + ids, + method: 'delete', + }) +} //获取机具类型树2 export function equipmentTypeTree(query) { diff --git a/src/views/material/purchase/goodsArrived/component/addTools.vue b/src/views/material/purchase/goodsArrived/component/addTools.vue index 7010067b..0b660b01 100644 --- a/src/views/material/purchase/goodsArrived/component/addTools.vue +++ b/src/views/material/purchase/goodsArrived/component/addTools.vue @@ -367,7 +367,6 @@ export default { }, maForm: { taxRate:13, - purchaseTime: '', arrivalTime: '', purchaser: '', remark: '', @@ -423,11 +422,7 @@ export default { }, }, watch: { - 'maForm.purchaseTime'() { - if (this.maForm.purchaseTime != '') { - // this.maForm.arrivalTime = '' - } - }, + }, mounted() { this.equipmentType() @@ -570,10 +565,12 @@ export default { getTaskInfo() { // this.loading = true; getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => { - // this.taskInfo = response.data - this.maForm.purchaseTime = response.data.purchaseTime + this.maForm = response.data.purchaseCheckInfo + + this.maForm.id = response.data.purchaseCheckInfo.id + this.maForm.taskId = response.data.purchaseCheckInfo.taskId this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime - // this.maForm.purchaser = response.data.purchaser + this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId this.maForm.remark = response.data.purchaseCheckInfo.remark this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate // this.maForm.purchaseNumber = response.data.purchaseNumber diff --git a/src/views/material/purchase/goodsArrived/component/home.vue b/src/views/material/purchase/goodsArrived/component/home.vue index 87151647..4c567e7d 100644 --- a/src/views/material/purchase/goodsArrived/component/home.vue +++ b/src/views/material/purchase/goodsArrived/component/home.vue @@ -74,7 +74,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['newPurchase:tools:add']" + v-hasPermi="['purchase:info:add']" >设备到货新增 @@ -161,7 +161,7 @@ @@ -169,7 +169,7 @@ @@ -186,7 +186,7 @@ size="mini" style="margin-bottom: 10px;" type="primary" @click="handleUpdate(scope.row)" - v-hasPermi="['newPurchase:tools:edit']" + v-hasPermi="['purchase:info:edit']" >编辑 @@ -194,7 +194,7 @@ size="mini" style="margin-bottom: 10px;" type="success" @click="handleNotice(scope.row)" - v-hasPermi="['newPurchase:tools:edit']" + v-hasPermi="['purchase:person:notice']" >通知 删除 @@ -390,11 +390,11 @@ - + - + @@ -441,7 +441,7 @@ @@ -577,6 +577,10 @@ export default { form: { remark: '', }, + // 表单校验 + rules: { + remark: [{required: true,message: '通知内容不能为空',trigger: 'blur'}], + }, openPrint: false, printData: {}, printTableData: [], @@ -677,13 +681,12 @@ export default { this.userList = response.rows }) }, - + // 多选框选中-添加人员 - handleSelectionUser(selection) { + handleSelectionAddUser(selection) { // console.log(selection) this.chosenUserList = selection }, - //添加人员 addUser() { if (this.chosenUserList.length < 1) { @@ -711,18 +714,25 @@ export default { }) .catch(() => {}) }, + // 多选框选中-通知人员 + handleSelectionUser(selection) { + // console.log(selection) + this.configUserList = selection + }, //确认消息通知 configNotice() { this.$refs['form'].validate((valid) => { if (valid) { this.configUserList.forEach((item, index) => { - item.telphone = item.telphone - item.remark = this.form.remark + console.log(item) + // item.telphone = item.telphone + // item.remark = this.form.remark this.phoneNumbers.push(item.telphone) }) let param = { + taskId:this.form.taskId, phoneNumbers: this.phoneNumbers, - content: this.form.remark, + content: this.form.remark } if (this.configUserList.length > 0) { bmNoticeInfo(param).then((response) => {