diff --git a/src/views/modules/inspection/inspectionScheduleOverview.vue b/src/views/modules/inspection/inspectionScheduleOverview.vue index d5b27eb..3296ed3 100644 --- a/src/views/modules/inspection/inspectionScheduleOverview.vue +++ b/src/views/modules/inspection/inspectionScheduleOverview.vue @@ -3,19 +3,23 @@ - - + +
+ 起始日期 +
+ - - - 查询 - - + style="width: 150px;" + @change="handleStartDateChange" /> + + 回到今天 +
+
@@ -288,15 +292,30 @@ export default { this.qcList = [] }) }, - queryAllQcSchedule () { - if (!this.allQcQuery.startDate) { + // 起始日期前后滚动:每次移动 1 天并刷新查询显示 + shiftStartDate (offsetDays) { + const base = this.parseDateString(this.allQcQuery.startDate) || new Date() + const next = new Date(base) + next.setDate(base.getDate() + offsetDays) + this.allQcQuery.startDate = this.formatDate(next) + this.loadAllQcSchedule() + }, + // 手动选择起始日期后刷新查询 + handleStartDateChange (val) { + if (!val) { + // 清空时回退到今天 this.allQcQuery.startDate = this.getTodayDateString() } this.loadAllQcSchedule() }, + // 回到今天并刷新 + backToToday () { + this.allQcQuery.startDate = this.getTodayDateString() + this.loadAllQcSchedule() + }, loadAllQcSchedule () { if (!this.qcList || this.qcList.length === 0) { - this.allScheduleDays = this.generateNextDays(10, this.allQcQuery.startDate) + this.allScheduleDays = this.generateNextDays(20, this.allQcQuery.startDate) this.$message.warning('暂无QC人员数据') return } @@ -306,7 +325,7 @@ export default { const promises = this.qcList.map(qc => { return getScheduleView(qc.userName, startDate, this.$store.state.user.site).then(({ data }) => { if (data.code === 0) { - const days = this.generateNextDays(10, startDate) + const days = this.generateNextDays(20, startDate) const tasksByDate = {} ;(data.list || []).forEach(task => { const taskStartDate = new Date(task.planStartDate) @@ -338,15 +357,15 @@ export default { })) return { userName: qc.userName, qcName: qc.qcName, scheduleDays } } - return { userName: qc.userName, qcName: qc.qcName, scheduleDays: this.generateNextDays(10, startDate) } + return { userName: qc.userName, qcName: qc.qcName, scheduleDays: this.generateNextDays(20, startDate) } }).catch(() => { - return { userName: qc.userName, qcName: qc.qcName, scheduleDays: this.generateNextDays(10, startDate) } + return { userName: qc.userName, qcName: qc.qcName, scheduleDays: this.generateNextDays(20, startDate) } }) }) Promise.all(promises).then(results => { const daysMap = {} - const baseDays = this.generateNextDays(10, startDate) + const baseDays = this.generateNextDays(20, startDate) baseDays.forEach(day => { daysMap[day.date] = { date: day.date, @@ -539,9 +558,53 @@ export default { } /* ===== 页签一:所有QC排程 ===== */ -.all-qc-query-form { +.schedule-toolbar { + display: flex; + flex-direction: column; + align-items: flex-start; + margin-bottom: 12px; padding: 0 4px; - margin-bottom: 6px; + + .start-date-label { + margin-bottom: 6px; + font-size: 14px; + color: #606266; + white-space: nowrap; + } + + .schedule-toolbar-row { + display: flex; + align-items: center; + } + + .shift-btn { + padding: 6px 10px; + color: #606266; + } + + .shift-btn:hover { + color: #409eff; + background: #ecf5ff; + } + + .shift-btn--left { + margin-right: 6px; + } + + .shift-btn--right { + margin-left: 6px; + margin-right: 12px; + } + + // 隐藏日期框内的前缀日历图标(保留右侧清空按钮),并收紧左侧内边距 + // 注意:vue-loader 13 只认 /deep/,::v-deep 不生效 + /deep/ .el-date-editor .el-input__icon.el-icon-date { + display: none; + } + + /deep/ .el-date-editor .el-date-editor--date__inner { + padding-left: 15px; + } } .all-qc-schedule-container { diff --git a/src/views/modules/order/com_inspectionDetailList.vue b/src/views/modules/order/com_inspectionDetailList.vue index 12c8773..b96129d 100644 --- a/src/views/modules/order/com_inspectionDetailList.vue +++ b/src/views/modules/order/com_inspectionDetailList.vue @@ -226,6 +226,22 @@ export default { this.searchTable() }, + // 跳转目标路由名:按订单类型区分「采购单验货」/「打样单验货」(与 myInspectionList / mySampleInspectionList 一致), + // 两个路由由 sys_menu 动态注册,菜单还没配或本次登录前未注册时路由并不存在 + // (vue-router 3.0 对不存在的 name 只静默告警、不会真的跳),故先做存在性探测,探不到就退回原「验货任务」页 + resolveIqcEntryRouteName (orderType) { + const target = orderType === 'Sample' ? 'qc-IQCResultSampleEntry' : 'qc-IQCResultPoEntry' + try { + const matched = this.$router.match({ name: target }) + if (matched && matched.matched && matched.matched.length > 0) { + return target + } + } catch (e) { + // 探测异常按原路由处理 + } + return 'qc-IQCResultEntry' + }, + jumpToInspection(row) { const inspectionNo = row && row.inspectNo ? String(row.inspectNo).trim() : '' if (!inspectionNo) { @@ -233,7 +249,7 @@ export default { return } this.$router.push({ - name: 'qc-IQCResultEntry', + name: this.resolveIqcEntryRouteName(row.orderType), query: { inspectionNo, jumpMode: 'single' diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index e51829a..025d883 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -2754,11 +2754,13 @@ // 派生窗口(采购单验货 / 打样单验货 / 验货审核)的数据范围硬约束: // 查询与导出两个出口都要调用,否则导出会绕过页面过滤把他人单子、打样单一并导出 - applyPageScopeParams (queryParams) { + applyPageScopeParams (queryParams, options = {}) { if (this.orderScope) { queryParams.orderType = this.orderScope } - if (this.qcOnly) { + // 精确单号跳转(如订单查询页验货明细「跳转」)是查看指定单据,不按登录 QC 隔离, + // 否则单据指派给其它 QC 时跳转过来会查不到;常规列表查询与导出仍按 qcOnly 隔离 + if (this.qcOnly && !options.skipQcOnly) { queryParams.qcOperatorAccount = this.searchData.userName || this.$store.state.user.name } if (this.auditMode) { @@ -2787,7 +2789,7 @@ this.searchData.page = this.pageIndex queryParams = this.searchData } - this.applyPageScopeParams(queryParams) + this.applyPageScopeParams(queryParams, { skipQcOnly: useTemporaryInspectionNo }) qcIQCInspectionSearch(queryParams).then(({data}) => { if (data.code === 0) { if (useTemporaryInspectionNo) { diff --git a/src/views/modules/srmPart/partInfoList.vue b/src/views/modules/srmPart/partInfoList.vue index f29d722..d4023e5 100644 --- a/src/views/modules/srmPart/partInfoList.vue +++ b/src/views/modules/srmPart/partInfoList.vue @@ -177,10 +177,14 @@ + + + @@ -551,6 +555,7 @@ import suppliers from './com_part_Suppliers' import approval from './com_part_Approval' import attachments from './com_part_Attachments' import PartAdvancedCopyDialog from './PartAdvancedCopyDialog' +import SupplierPartTierChangeDialog from '@/views/modules/supplier/com_supplierPartTierChangeDialog' import { approveNodeInstance, @@ -1174,6 +1179,7 @@ export default { /* 组件 */ components: { PartAdvancedCopyDialog, + SupplierPartTierChangeDialog, Chooselist, basicInfo, specParams, @@ -1523,6 +1529,24 @@ export default { this.priceDialogPartNo = '' this.priceDialogSupplierNo = '' }, + // 价格表弹窗内「维护价格表」:打开与 supplierPartMoqPrice「变更」一致的阶梯价格变更弹窗 + openTierChangeFromPriceDialog () { + if (!this.priceDialogSupplierNo || !this.priceDialogPartNo) { + this.$message.warning('缺少供应商或物料编码,无法维护价格表') + return + } + this.$refs.tierChangeDialog.open({ + site: this.$store.state.user.site, + supplierCode: this.priceDialogSupplierNo, + partNo: this.priceDialogPartNo + }) + }, + // 阶梯价格变更保存成功后刷新价格表弹窗的当前生效阶梯价 + handleTierChangeSaved ({ site, supplierCode, partNo }) { + if (this.priceDialogVisible) { + this.loadSupplierPartPriceDialog({ site, supplierCode, partNo }) + } + }, openChangeDefaultSupplier (row) { if (!row || !row.partNo) { this.$message.warning('请先选择物料') diff --git a/src/views/modules/supplier/com_supplierPartTierChangeDialog.vue b/src/views/modules/supplier/com_supplierPartTierChangeDialog.vue new file mode 100644 index 0000000..ed1f19e --- /dev/null +++ b/src/views/modules/supplier/com_supplierPartTierChangeDialog.vue @@ -0,0 +1,709 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/supplier/supplierPartMoqPrice.vue b/src/views/modules/supplier/supplierPartMoqPrice.vue index c356e80..7f1de98 100644 --- a/src/views/modules/supplier/supplierPartMoqPrice.vue +++ b/src/views/modules/supplier/supplierPartMoqPrice.vue @@ -316,6 +316,7 @@ :close-on-click-modal="false" class="tier-change-dialog" v-drag + @keyup.enter.native="onTierDialogEnter" > @@ -1104,6 +1105,13 @@ export default { rows.push(this.buildEmptyTierRow()) } }, + // 弹窗内按回车等同于点击「新增梯度」;textarea 回车换行、下拉/日期选择的回车不触发 + onTierDialogEnter (e) { + const target = e.target + if (!target || target.tagName !== 'INPUT') return + if (target.closest('.el-select') || target.closest('.el-date-editor')) return + this.addTierRow() + }, setNoTier () { const rows = this.tierForm.tierPriceList || [] // 无梯度:仅允许存在一条价格梯度,将其结束数量置为上不封顶(1000000)