新购-新增
This commit is contained in:
		
							parent
							
								
									83a3627af9
								
							
						
					
					
						commit
						c16548d169
					
				| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -74,7 +74,7 @@
 | 
			
		|||
                    icon="el-icon-plus"
 | 
			
		||||
                    size="mini"
 | 
			
		||||
                    @click="handleAdd"
 | 
			
		||||
                    v-hasPermi="['newPurchase:tools:add']"
 | 
			
		||||
                    v-hasPermi="['purchase:info:add']"
 | 
			
		||||
                    >设备到货新增</el-button
 | 
			
		||||
                >
 | 
			
		||||
            </el-col>
 | 
			
		||||
| 
						 | 
				
			
			@ -161,7 +161,7 @@
 | 
			
		|||
            <el-table-column
 | 
			
		||||
                label="操作人"
 | 
			
		||||
                align="center"
 | 
			
		||||
                prop="createUserName"
 | 
			
		||||
                prop="updateBy"
 | 
			
		||||
                :show-overflow-tooltip="true"
 | 
			
		||||
            />
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -169,7 +169,7 @@
 | 
			
		|||
            <el-table-column
 | 
			
		||||
                label="操作时间"
 | 
			
		||||
                align="center" width="160"
 | 
			
		||||
                prop="createTime"
 | 
			
		||||
                prop="updateTime"
 | 
			
		||||
                :show-overflow-tooltip="true"
 | 
			
		||||
            />
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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']"
 | 
			
		||||
                        >编辑</el-button
 | 
			
		||||
                    >
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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']"
 | 
			
		||||
                        >通知</el-button
 | 
			
		||||
                    > 
 | 
			
		||||
                    <el-button
 | 
			
		||||
| 
						 | 
				
			
			@ -208,7 +208,7 @@
 | 
			
		|||
                        size="mini"
 | 
			
		||||
                        type="danger" 
 | 
			
		||||
                        @click="handleDelete(scope.row)"
 | 
			
		||||
                        v-hasPermi="['newPurchase:tools:del']"
 | 
			
		||||
                        v-hasPermi="['purchase:info:remove']"
 | 
			
		||||
                        >删除</el-button
 | 
			
		||||
                    >
 | 
			
		||||
                </template>
 | 
			
		||||
| 
						 | 
				
			
			@ -390,11 +390,11 @@
 | 
			
		|||
      <el-dialog :title="title" :visible.sync="showPeople" width="800px" append-to-body @close="cancel">
 | 
			
		||||
             <el-row :gutter="24">  
 | 
			
		||||
             <el-col :span="20">
 | 
			
		||||
              <el-form :model="form" ref="form" size="small" :inline="true" >
 | 
			
		||||
              <el-form :model="form" ref="form" size="small" :inline="true" :rules="rules">
 | 
			
		||||
                 <el-form-item label="通知内容:" prop="remark" label-width="100px">
 | 
			
		||||
                    <el-input
 | 
			
		||||
                        v-model="form.remark"
 | 
			
		||||
                        type="textarea"
 | 
			
		||||
                        type="textarea" maxlength="100"
 | 
			
		||||
                        :autosize="{ minRows: 3, maxRows: 6 }"
 | 
			
		||||
                        placeholder="请输入通知内容"
 | 
			
		||||
                        style="width: 450px"
 | 
			
		||||
| 
						 | 
				
			
			@ -404,7 +404,7 @@
 | 
			
		|||
             </el-col> 
 | 
			
		||||
           </el-row> 
 | 
			
		||||
 | 
			
		||||
      <el-table :data="getListPeople" width="600px" height="450" >
 | 
			
		||||
      <el-table :data="getListPeople" width="600px" height="450" @selection-change="handleSelectionUser">
 | 
			
		||||
        <el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
 | 
			
		||||
        <el-table-column label="人员名称" align="center" prop="userName" :show-overflow-tooltip="true"/>
 | 
			
		||||
        <el-table-column label="所属机构" align="center" prop="deptName" :show-overflow-tooltip="true"/>
 | 
			
		||||
| 
						 | 
				
			
			@ -441,7 +441,7 @@
 | 
			
		|||
            <el-table
 | 
			
		||||
                v-loading="loading"
 | 
			
		||||
                :data="userList"
 | 
			
		||||
                @selection-change="handleSelectionUser"
 | 
			
		||||
                @selection-change="handleSelectionAddUser"
 | 
			
		||||
                height="450"
 | 
			
		||||
            >
 | 
			
		||||
                <el-table-column type="selection" width="50" align="center" />
 | 
			
		||||
| 
						 | 
				
			
			@ -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) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue