Browse Source

2026-01-20

收货入库任务通知和拣货出库任务通知增加部门
master
fengyuan_yang 13 hours ago
parent
commit
d4faf4f869
  1. 2
      src/api/qc/Inbound_notification.js
  2. 2
      src/api/qc/outbound_notification.js
  3. 153
      src/views/modules/qc/inboundNotification.vue
  4. 155
      src/views/modules/qc/outboundNotification.vue

2
src/api/qc/Inbound_notification.js

@ -27,4 +27,6 @@ export const updateInboundDetail = data => createAPI('/inbound/updateInboundDeta
export const getInboundDetail2 = data => createAPI('/inbound/getInboundDetail2','post',data)
// 查询入库类别列表
export const getInboundCategoryList = data => createAPI('/inbound/getInboundCategoryList','post',data)
// 查询部门列表
export const getDepartmentList = data => createAPI('/inbound/getDepartmentList','post',data)

2
src/api/qc/outbound_notification.js

@ -28,4 +28,6 @@ export const updateOutboundDetail = data => createAPI('/outbound/updateOutboundD
export const getOutboundDetail2 = data => createAPI('/outbound/getOutboundDetail2','post',data)
// 查询出库类别列表
export const getOutboundCategoryList = data => createAPI('/outbound/getOutboundCategoryList','post',data)
// 查询部门列表
export const getDepartmentList = data => createAPI('/outbound/getDepartmentList','post',data)

153
src/views/modules/qc/inboundNotification.vue

@ -123,7 +123,7 @@
<!-- 收货入库通知新增/修改 -->
<el-dialog title="收货入库通知" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="545px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" ref="modalForm" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="BU" prop="bu">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 100px">
<el-option
@ -152,8 +152,8 @@
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="入库类别">
<el-select v-model="modalData.category" placeholder="请选择" clearable style="width: 140px">
<el-form-item label="入库类别" prop="category">
<el-select v-model="modalData.category" placeholder="请选择" style="width: 140px">
<el-option
v-for="item in categoryList"
:key="item.crdcode"
@ -163,12 +163,22 @@
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
<el-form :inline="true" label-position="top" :rules="rules" ref="modalForm" :model="modalData" style="margin-left: 7px">
<el-form-item>
<!-- <span v-if="modalDisableFlag" slot="label">供应商</span>-->
<span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
<el-input v-model="modalData.supplierId" @change="supplierBlur(506)" style="width: 120px"></el-input>
<el-input v-model="modalData.supplierName" disabled style="width: 380px"></el-input>
<el-input v-model="modalData.supplierName" disabled style="width: 223px"></el-input>
</el-form-item>
<el-form-item label="部门" prop="departmentNo">
<el-select v-model="modalData.departmentNo" placeholder="请选择" style="width: 140px">
<el-option
v-for="item in departmentList"
:key="item.departmentNo"
:label="item.departmentNo + '-' + item.departmentDesc"
:value="item.departmentNo">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px">
@ -674,6 +684,7 @@
updateInboundDetail, //
getInboundDetail2, //
getInboundCategoryList, //
getDepartmentList, //
} from "@/api/qc/Inbound_notification.js"
import {
getSiteAndBuByUserName,
@ -753,6 +764,7 @@
category: '', //
},
categoryList: [], //
departmentList: [], //
dataList: [],
detailList: [],
userBuList: [],
@ -891,6 +903,24 @@
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 610,
serialNumber: '610Table1DepartmentName',
tableId: "610Table1",
tableName: "收货入库任务表",
columnProp: 'departmentName',
headerAlign: "center",
align: "center",
columnLabel: '部门',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 610,
@ -1145,6 +1175,20 @@
message: ' ',
trigger: ['blur','change']
}
],
category: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
departmentNo: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
]
},
searchLoading: false,
@ -1280,16 +1324,24 @@
orderNo: '',
orderType: '',
orderStatus: '草稿',
requiredInboundDate: '',
requiredInboundDate: this.dayjs().format('YYYY-MM-DD'), //
supplierId: '',
supplierName: '',
remarks: '',
createdBy: this.$store.state.user.name,
category: '', //
departmentNo: '', //
}
this.modalDisableFlag = false
this.loadCategoryList() //
this.loadDepartmentList() //
this.modalFlag = true
//
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
updateModal (row) {
@ -1310,51 +1362,55 @@
remarks: row.remarks,
updatedBy: this.$store.state.user.name,
category: row.category || '', //
departmentNo: row.departmentNo || '', //
}
this.modalDisableFlag = true
this.loadCategoryList() //
this.loadDepartmentList() //
this.modalFlag = true
//
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
saveData () {
if (this.modalData.bu === '' || this.modalData.bu == null) {
this.$message.warning('请选择BU!')
return
}
if (this.modalData.orderType === '' || this.modalData.orderType == null) {
this.$message.warning('请选择单据类型!')
return
}
if (this.modalData.requiredInboundDate === '' || this.modalData.requiredInboundDate == null) {
this.$message.warning('请选择要求入库日期!')
return
}
this.saveLoading = true
if (this.modalData.flag === '1') { //
saveInboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
} else { //
updateInboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
}
// 使
this.$refs.modalForm.validate((valid) => {
if (!valid) {
this.$message.warning('请填写完整的必填项!')
return false
}
this.saveLoading = true
if (this.modalData.flag === '1') { //
saveInboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
} else { //
updateInboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
}
})
},
//
@ -1896,6 +1952,15 @@
}
})
},
//
loadDepartmentList () {
getDepartmentList({}).then(({data}) => {
if (data && data.code === 0) {
this.departmentList = data.rows || []
}
})
},
}
}
</script>

155
src/views/modules/qc/outboundNotification.vue

@ -124,7 +124,7 @@
<!-- 拣货出库通知新增/修改 -->
<el-dialog title="拣货出库通知" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="545px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" ref="modalForm" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="BU" prop="bu">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 100px">
<el-option
@ -153,8 +153,8 @@
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="出库类别">
<el-select v-model="modalData.category" placeholder="请选择" clearable style="width: 140px">
<el-form-item label="出库类别" prop="category">
<el-select v-model="modalData.category" placeholder="请选择" style="width: 140px">
<el-option
v-for="item in categoryList"
:key="item.crdcode"
@ -164,18 +164,28 @@
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
<el-form :inline="true" label-position="top" :rules="rules" ref="modalForm" :model="modalData" style="margin-left: 7px">
<!-- 采购退货时显示供应商 -->
<el-form-item v-if="modalData.orderType === '采购退货'">
<span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
<el-input v-model="modalData.customerId" @change="customerBlur(506)" style="width: 120px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 380px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 223px"></el-input>
</el-form-item>
<!-- 其他出库时显示直接客户 -->
<el-form-item v-else-if="modalData.orderType === '其他出库'">
<span style="cursor: pointer" slot="label" @click="getBaseList(507)"><a href="#">直接客户</a></span>
<el-input v-model="modalData.customerId" @change="customerBlur(507)" style="width: 120px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 380px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 223px"></el-input>
</el-form-item>
<el-form-item label="部门" prop="departmentNo">
<el-select v-model="modalData.departmentNo" placeholder="请选择" style="width: 140px">
<el-option
v-for="item in departmentList"
:key="item.departmentNo"
:label="item.departmentNo + '-' + item.departmentDesc"
:value="item.departmentNo">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px">
@ -641,6 +651,7 @@
updateOutboundDetail, //
getOutboundDetail2, //
getOutboundCategoryList, //
getDepartmentList, //
} from "@/api/qc/outbound_notification.js"
import {
getSiteAndBuByUserName,
@ -721,6 +732,7 @@
category: '', //
},
categoryList: [], //
departmentList: [], //
dataList: [],
detailList: [],
userBuList: [],
@ -877,6 +889,24 @@
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 620,
serialNumber: '620Table1DepartmentName',
tableId: "620Table1",
tableName: "拣货出库任务表",
columnProp: 'departmentName',
headerAlign: "center",
align: "center",
columnLabel: '部门',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 620,
@ -1092,6 +1122,20 @@
message: ' ',
trigger: ['blur','change']
}
],
category: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
departmentNo: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
]
},
searchLoading: false,
@ -1214,16 +1258,24 @@
orderNo: '',
orderType: '采购退货', // 退
orderStatus: '草稿',
requiredOutboundDate: '',
requiredOutboundDate: this.dayjs().format('YYYY-MM-DD'), //
customerId: '',
customerName: '',
remarks: '',
createdBy: this.$store.state.user.name,
category: '', //
departmentNo: '', //
}
this.modalDisableFlag = false
this.loadCategoryList() //
this.loadDepartmentList() //
this.modalFlag = true
//
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
updateModal (row) {
@ -1244,51 +1296,55 @@
remarks: row.remarks,
updatedBy: this.$store.state.user.name,
category: row.category || '', //
departmentNo: row.departmentNo || '', //
}
this.modalDisableFlag = true
this.loadCategoryList() //
this.loadDepartmentList() //
this.modalFlag = true
//
this.$nextTick(() => {
if (this.$refs.modalForm) {
this.$refs.modalForm.clearValidate()
}
})
},
saveData () {
if (this.modalData.bu === '' || this.modalData.bu == null) {
this.$message.warning('请选择BU!')
return
}
if (this.modalData.orderType === '' || this.modalData.orderType == null) {
this.$message.warning('请选择单据类型!')
return
}
if (this.modalData.requiredOutboundDate === '' || this.modalData.requiredOutboundDate == null) {
this.$message.warning('请选择要求出库日期!')
return
}
this.saveLoading = true
if (this.modalData.flag === '1') { //
saveOutboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
} else { //
updateOutboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
}
// 使
this.$refs.modalForm.validate((valid) => {
if (!valid) {
this.$message.warning('请填写完整的必填项!')
return false
}
this.saveLoading = true
if (this.modalData.flag === '1') { //
saveOutboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
} else { //
updateOutboundNotification(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message.success('操作成功')
} else {
this.$message.error(data.msg)
}
}).finally(()=>{
this.saveLoading = false
})
}
})
},
//
@ -1919,6 +1975,15 @@
}
})
},
//
loadDepartmentList () {
getDepartmentList({}).then(({data}) => {
if (data && data.code === 0) {
this.departmentList = data.rows || []
}
})
},
}
}
</script>

Loading…
Cancel
Save