| New file |
| | |
| | | <template> |
| | | <view> |
| | | <uni-popup ref="popup" type="bottom" @change="popupChangeHandler"> |
| | | <view class="content"> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>日期: </text></view> |
| | | <view class="daterange" style="flex: 1;"> |
| | | <view class="right general"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="HBeginDate"> |
| | | <view>{{HBeginDate}}</view> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | <view>—</view> |
| | | <view class="right general"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="HEndDate"> |
| | | <view>{{HEndDate}}</view> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 保持与故障登记单相同的搜索条件 --> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>模具编码: </text></view> |
| | | <view class="right"><input type="text" :focus="enablefocus" v-model="HNumber" |
| | | @confirm="getRepairRecordList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>模具名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getRepairRecordList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>单据号: </text></view> |
| | | <view class="right"><input type="text" v-model="HBillNo" @confirm="getRepairRecordList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="search">搜索</button> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 50vh;"> |
| | | <view class="options-wrapper" v-show="HRepairRecordList.length != 0"> |
| | | <uni-card :is-active="record.isActive" :class="record.isActive?'uni-card--is-active':''" |
| | | v-for="(record, index) in HRepairRecordList[curPage-1]" :key="index" |
| | | :title="record['单据号'] || record['HBillNo'] || record['维修单号']" |
| | | @tap="clickCard(record, index)"> |
| | | <view class="item"> |
| | | <view class="left">日期: </view> |
| | | <view class="right">{{dayjs(record['日期'] || record['维修日期'] || record['HDate']).format('YYYY-MM-DD')}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['模具编码'] || record['HMouldCode']"> |
| | | <view class="left">模具编码: </view> |
| | | <view class="right">{{record['产品模具代码'] || record['HMouldCode']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['模具名称'] || record['HMouldName']"> |
| | | <view class="left">模具名称: </view> |
| | | <view class="right">{{record['产品模具'] || record['HMouldName']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['模具规格'] || record['HMouldSpec']"> |
| | | <view class="left">模具规格: </view> |
| | | <view class="right">{{record['模具规格'] || record['HMouldSpec']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['模具型号'] || record['HMouldModel']"> |
| | | <view class="left">模具型号: </view> |
| | | <view class="right">{{record['模具型号'] || record['HMouldModel']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['维修单号'] || record['HRepairNo']"> |
| | | <view class="left">维修单号: </view> |
| | | <view class="right">{{record['维修单号'] || record['HRepairNo']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['维修内容'] || record['HRepairContent']"> |
| | | <view class="left">维修内容: </view> |
| | | <view class="right">{{record['维修内容'] || record['HRepairContent']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['维修人'] || record['HEmpName']"> |
| | | <view class="left">维修人: </view> |
| | | <view class="right">{{record['维修人'] || record['HEmpName']}}</view> |
| | | </view> |
| | | <view class="item" v-if="record['维修人'] || record['HStatus']"> |
| | | <view class="left">维修人: </view> |
| | | <view class="right">{{record['维修人'] || record['HStatus']}}</view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HRepairRecordList.length == 0">暂无数据</view> |
| | | </scroll-view> |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" |
| | | :total="length"></uni-pagination> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs'; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth'; |
| | | export default { |
| | | name: "RepairRecordPopup", |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HMouldID: 0, // 当前选择的模具ID |
| | | HRepairRecordList: [], |
| | | |
| | | // 搜索条件 - 与故障登记单保持一致 |
| | | HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HNumber: '', |
| | | HName: '', |
| | | HBillNo: '', |
| | | |
| | | }; |
| | | }, |
| | | props: { |
| | | HBillType: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | // 新增一个是否显示模具信息的参数 |
| | | showMouldInfo: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getRepairRecordList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.resetSearchConditions(); |
| | | await this.$nextTick(); |
| | | this.$refs.popup.close(); |
| | | }, |
| | | |
| | | resetSearchConditions() { |
| | | this.size = 20; |
| | | this.curPage = 1; |
| | | this.length = 0; |
| | | this.page = 0; |
| | | this.HRepairRecordList = []; |
| | | this.enablefocus = false; |
| | | |
| | | // 重置搜索条件 |
| | | this.HBeginDate = dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"); |
| | | this.HEndDate = dayjs(new Date()).format("YYYY-MM-DD"); |
| | | this.HNumber = ''; |
| | | this.HName = ''; |
| | | this.HBillNo = ''; |
| | | this.HRepairNo = ''; |
| | | this.HRepairContent = ''; |
| | | this.HRepairStatus = ''; |
| | | }, |
| | | |
| | | showPopup(HMouldID) { |
| | | this.HMouldID = HMouldID || 0; |
| | | this.resetSearchConditions(); |
| | | this.$refs.popup.open(); |
| | | }, |
| | | |
| | | search() { |
| | | this.getRepairRecordList(); |
| | | }, |
| | | |
| | | repairStatusChange(e) { |
| | | const index = e.detail.value; |
| | | if (index == 0) { |
| | | this.HRepairStatus = ''; // 全部 |
| | | } else { |
| | | this.HRepairStatus = this.repairStatusOptions[index]; |
| | | } |
| | | }, |
| | | |
| | | clickCard(record, index) { |
| | | // 发送选择完成事件 |
| | | uni.$emit('RepairRecordSelectComplete', { |
| | | HInterID: record["hmainid"], |
| | | HEntryID: record["hsubid"] || record["HEntryID"] || 0, |
| | | HBillNo: record["单据号"] || record["HBillNo"] || "", |
| | | HMouldID: record['HMouldID'] || this.HMouldID || 0, |
| | | HMouldName: record['产品模具'], |
| | | HMouldCode: record['产品模具代码'], |
| | | HMouldSpec: record['模具规格'], |
| | | HMouldModel: record['模具型号'] |
| | | }); |
| | | }, |
| | | |
| | | getsWhere() { |
| | | let sWhere = ''; |
| | | |
| | | // 日期范围条件 - 与故障登记单保持一致 |
| | | if (this.HBeginDate && this.HEndDate) { |
| | | sWhere += ` and (CONVERT(varchar(100),日期, 23) between '${this.HBeginDate}' and '${this.HEndDate}') `; |
| | | } |
| | | // 模具ID条件 - 如果传入了模具ID |
| | | if (this.HMouldID) { |
| | | sWhere += ` and HMouldID = ${this.HMouldID} `; |
| | | } |
| | | // 模具编码条件 |
| | | if (this.HNumber) { |
| | | sWhere += ` and (产品模具代码 like '%${this.HNumber}%' `; |
| | | } |
| | | // 模具名称条件 |
| | | if (this.HName) { |
| | | sWhere += ` and (产品模具 like '%${this.HName}%' `; |
| | | } |
| | | // 单据号条件 |
| | | if (this.HBillNo) { |
| | | sWhere += ` and (单据号 like '%${this.HBillNo}%' `; |
| | | } |
| | | return sWhere; |
| | | }, |
| | | |
| | | getRepairRecordList() { |
| | | this.HRepairRecordList = []; |
| | | this.length = 0; |
| | | this.page = 0; |
| | | this.curPage = 1; |
| | | |
| | | // 调用维修记录列表接口 |
| | | CommonUtils.doRequest( |
| | | "/Sb_MouldRepairWorkBill/GetMouldRepairWorkBill_PDA", { // 请根据实际情况调整接口路径 |
| | | sWhere: this.getsWhere(), |
| | | user: getUserInfo()["Czymc"] |
| | | }, |
| | | (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data; |
| | | if (count == 1) { |
| | | this.length = Array.from(data).length; |
| | | const result = []; |
| | | for (let i = 0; i < data.length; i += this.size) { |
| | | result.push(data.slice(i, i + this.size)); |
| | | } |
| | | this.HRepairRecordList = result; |
| | | this.page = result.length; |
| | | setTimeout(() => { |
| | | this.enablefocus = true; |
| | | }, 500); |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true; |
| | | }, 500); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message || '暂无维修记录数据' |
| | | }); |
| | | } |
| | | }, |
| | | (err) => { |
| | | setTimeout(() => { |
| | | this.enablefocus = true; |
| | | }, 500); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '加载失败: ' + (err.message || '未知错误') |
| | | }); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .content { |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx 15rpx 0 0; |
| | | padding: 20rpx 20rpx 40rpx 20rpx; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | |
| | | .search-condition { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | gap: 20rpx; |
| | | font-size: 30rpx; |
| | | |
| | | .title { |
| | | width: 5rem; |
| | | text-align: right; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | height: auto; |
| | | padding: 8rpx 16rpx; |
| | | |
| | | input { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | picker { |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | line-height: 1.5; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: grid; |
| | | grid-template-columns: repeat(1, 1fr); |
| | | gap: 20rpx; |
| | | |
| | | >view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | .left { |
| | | display: inline-block; |
| | | width: 6rem; |
| | | font-size: 26rpx; |
| | | color: #666; |
| | | } |
| | | |
| | | .right { |
| | | display: inline-block; |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uni-card--is-active { |
| | | background-color: rgba(0, 122, 255, 0.2); |
| | | } |
| | | |
| | | .daterange { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .over { |
| | | text-align: center; |
| | | padding: 100rpx 0; |
| | | color: #999; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | { |
| | | "path": "pages/mujvzhuangtai/mujvzhuangtai", |
| | | "style": { |
| | | "navigationBarTitleText": "模具状态分布", |
| | | "navigationBarTitleText": "器具状态分布", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/mujvzhuangtai/detail", |
| | | "style": { |
| | | "navigationBarTitleText": "模具状态详情" |
| | | "navigationBarTitleText": "器具状态详情" |
| | | } |
| | | }, |
| | | { |
| | |
| | | { |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具点检记录单列表", |
| | | "navigationBarTitleText": "器具点检记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具点检记录单" |
| | | "navigationBarTitleText": "器具点检记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckRuleBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具点检规程" |
| | | "navigationBarTitleText": "器具点检规程" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录单列表", |
| | | "navigationBarTitleText": "器具保养记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养记录单" |
| | | "navigationBarTitleText": "器具保养记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport", |
| | | "style": { |
| | | "navigationBarTitleText": "器具保养任务" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport", |
| | | "style": { |
| | | "navigationBarTitleText": "设备保养任务" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainRuleBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具保养规程" |
| | | "navigationBarTitleText": "器具保养规程" |
| | | } |
| | | }, |
| | | { |
| | |
| | | { |
| | | "path": "pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料出库单", |
| | | "navigationBarTitleText": "器具领用出库单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料出库单", |
| | | "navigationBarTitleText": "器具领用出库单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料退库单", |
| | | "navigationBarTitleText": "器具领用退库单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | { |
| | | "path": "pages/shoujishouming/table", |
| | | "style": { |
| | | "navigationBarTitleText": "模具寿命调整单", |
| | | "navigationBarTitleText": "器具寿命调整单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/shoujishouming/form", |
| | | "style": { |
| | | "navigationBarTitleText": "模具寿命调整单", |
| | | "navigationBarTitleText": "器具寿命调整单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料出库单" |
| | | "navigationBarTitleText": "器具领用出库单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料出库单", |
| | | "navigationBarTitleText": "器具领用出库单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料退库单", |
| | | "navigationBarTitleText": "器具领用退库单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具领料退库单" |
| | | "navigationBarTitleText": "器具领用退库单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具调拨单", |
| | | "navigationBarTitleText": "器具调拨单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具调拨单", |
| | | "navigationBarTitleText": "器具调拨单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | { |
| | | "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具维修记录单列表", |
| | | "navigationBarTitleText": "器具维修记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具维修记录单" |
| | | "navigationBarTitleText": "器具维修记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具故障登记单" |
| | | "navigationBarTitleText": "器具故障登记单" |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具故障登记单列表" |
| | | "navigationBarTitleText": "器具故障登记单列表" |
| | | } |
| | | }, |
| | | { |
| | |
| | | { |
| | | "path": "pages/MJGL/Gy_MouldFile/Gy_MouldFileList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具档案查询", |
| | | "navigationBarTitleText": "器具档案查询", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | { |
| | | "path": "pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具报废出库单列表" |
| | | "navigationBarTitleText": "器具报废出库单列表" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具报废出库单", |
| | | "navigationBarTitleText": "器具报废出库单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <!-- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view> --> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view> |
| | | <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> --> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单类型:</view> |
| | | <zxz-uni-data-select class="right" :localdata="[ |
| | | {key: '手工录入', value: '-1'}, |
| | | {key: '模具故障登记单', value: '3815'} |
| | | ]" dataKey="key" dataValue="value" v-model="hform.HMainSourceBillType"> |
| | | <view class="title">源单类型</view> |
| | | <view class="right" v-show="showHMainSourceBillType"> |
| | | <picker :range="arrayHMainSourceBillType" @change="HMainSourceBillTypeChange"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | <input disabled name="HMainSourceBillType" v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | <view class="righton" v-show="!showHMainSourceBillType"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HMainSourceBillNo" /> |
| | | <view class="title required">故障登记单</view> |
| | | <view class="right" v-show="hform.HMainSourceBillType != 1"> |
| | | <input type="text" name="HBarCode" v-model="hform.HMainSourceBillNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | <view class="icon-wrapper" v-show="hform.HMainSourceBillType != 1" |
| | | :disabled="hform.HMainSourceBillType == -1"> |
| | | <uni-icons type="search" size="20" @click="showBillList"></uni-icons> |
| | | </view> |
| | | <view class="righton" v-show="hform.HMainSourceBillType == 1"> |
| | | <input type="text" disabled name="HBarCode" v-model="hform.HMainSourceBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | dataValue="HItemID" v-model="hform.HDeptID"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title required">验收人:</view> |
| | | <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName" |
| | | dataValue="HItemID" v-model="hform.HEmpID"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title required">验收项目:</view> |
| | | <zxz-uni-data-select required class="right" :localdata="HRepairCheckList" dataKey="维修验收项目" |
| | | dataValue="hitemid" v-model="hform.HRepairCheckMainID"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title required">负责人:</view> |
| | | <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName" |
| | | dataValue="HItemID" v-model="hform.HManagerID"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <!-- 扫码带出维修记录 --> |
| | | <view class="form-item"> |
| | | <view class="title required">维修记录:</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right" v-show="hform.HMainSourceBillType != 1"> |
| | | <input type="text" v-model="hform.HMouldRepairWorkName" |
| | | :disabled="hform.HMainSourceBillType == -1" placeholder="请选择维修记录" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | <view class="icon-wrapper" v-show="hform.HMainSourceBillType != 1" |
| | | :disabled="hform.HMainSourceBillType == -1"> |
| | | <uni-icons type="search" size="20" @click="showRepairRecordList"></uni-icons> |
| | | </view> |
| | | <view class="righton" v-show="hform.HMainSourceBillType == 1"> |
| | | <input type="text" disabled v-model="hform.HMouldRepairWorkName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> |
| | | <!-- 弹出模具故障登记单的选择列表 --> |
| | | <BillListPopupMouldConkBookBillVue ref="billList" :HBillType="hform.HBillType" |
| | | :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> |
| | | </BillListPopupMouldConkBookBillVue> |
| | | <!-- 弹出模具维修记录单的选择列表 --> |
| | | <RepairRecordPopup ref="repairRecordList" :HBillType="hform.HBillType" :HStockOrgID="hform.HStockOrgID"> |
| | | </RepairRecordPopup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import BillListPopupMouldConkBookBillVue from '../../../components/BillListPopup/BillListPopupMouldConkBookBill.vue'; |
| | | import RepairRecordPopup from '../../../components/BillListPopup/BillListPopuMouldRepairRecordPopup.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | BillListPopupMouldConkBookBillVue, |
| | | RepairRecordPopup |
| | | }, |
| | | name: 'Sc_MouldRepairCheckBill', |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "Sc_MouldRepairCheckBill", |
| | | HBillType: '3817', |
| | | operationType: 1, |
| | | uploadOptions: {}, |
| | | enableEdit: true, |
| | | |
| | | // 控制源单类型是否可编辑 |
| | | showHMainSourceBillType: true, |
| | | HMainSourceBillType: '模具故障登记单', |
| | | arrayHMainSourceBillType: ['模具故障登记单'], |
| | | arrayHMainSourceBillTypeID: ['3815'], |
| | | |
| | | HDeptList: [], |
| | | HRepairCheckList: [], |
| | | HEmpList: [], |
| | | |
| | | hform: { |
| | | "HBillType": 3817, |
| | | "HBarCode": "", |
| | | "HBillNo": "", |
| | | "HInterID": 0, |
| | |
| | | "HMouldSpec": "", |
| | | "HMouldModel": "", |
| | | "HMouldID": 0, |
| | | "HMainSourceBillType": "-1", |
| | | "HMainSourceBillType": "3815", |
| | | "HMainSourceInterID": 0, |
| | | "HMainSourceEntryID": 0, |
| | | "HCheckResult": "OK", |
| | |
| | | "HExplanation": "", |
| | | "HRemark": "", |
| | | "HOrgID": uni.getStorageSync("OrganizationID"), |
| | | "HStockOrgID": uni.getStorageSync("OrganizationID"), |
| | | "HMaker": getUserInfo()["Czymc"], |
| | | "HChecker": "", |
| | | "HCloseMan": "", |
| | |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | showRepairRecordList() { |
| | | if (this.hform.HMouldID === 0) { |
| | | CommonUtils.showTips({ |
| | | title: '提示', |
| | | message: '请先选择模具' |
| | | }); |
| | | return; |
| | | } |
| | | this.$refs.repairRecordList.showPopup(this.hform.HMouldID); |
| | | }, |
| | | //选择源单类型 |
| | | HMainSourceBillTypeChange(e) { |
| | | if (e.detail.value == -1 || e.detail.value == NaN) { |
| | | this.HMainSourceBillType = '手工录入' |
| | | this.hform.HMainSourceBillType = -1 |
| | | return |
| | | } |
| | | console.log(e.detail.value) |
| | | console.log(e) |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillTypeID[e.detail.value] |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, { |
| | | HSourceBillTypeName: this.HMainSourceBillType, |
| | | HSourceBillType: this.hform.HMainSourceBillType |
| | | }) |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | |
| | | this.getHDeptList() |
| | | this.getEmpList() |
| | | this.getCheckProjList() |
| | | // 监听故障登记单选择完成事件 |
| | | uni.$on('BillSelectComplete', (e) => { |
| | | console.log("接收到的消息: ", e) |
| | | this.hform.HMainSourceInterID = e.HInterID |
| | | this.hform.HMainSourceBillNo = e.HBillNo |
| | | this.hform.HMainSourceEntryID = e.HEntryID |
| | | this.hform.HMouldID = e.HMouldID |
| | | this.hform.HMouldName = e.HMouldName |
| | | this.hform.HMouldSpec = e.HMouldSpec |
| | | this.hform.HMouldModel = e.HMouldModel |
| | | this.$refs.billList.exit() |
| | | }) |
| | | // 监听维修记录选择完成事件 |
| | | uni.$on('RepairRecordSelectComplete', (e) => { |
| | | console.log("接收到维修记录选择: ", e); |
| | | if (e.HInterID) { |
| | | this.hform.HMouldRepairWorkName = e.HBillNo; |
| | | this.hform.HMouldRepairWorkID = e.HInterID; |
| | | // 可以根据需要设置其他字段 |
| | | } |
| | | this.$refs.repairRecordList.exit(); |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | uni.$off('BillSelectComplete'); |
| | | uni.$off('RepairRecordSelectComplete'); |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | |
| | | barCodeFocus: false, |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '手工录入', |
| | | arrayHMainSourceBillType: ['手工录入', '模具故障登记单'], |
| | | arrayHMainSourceBillTypeID: ['1', '3815'], |
| | | HMainSourceBillType: '模具故障登记单', |
| | | arrayHMainSourceBillType: ['模具故障登记单'], |
| | | arrayHMainSourceBillTypeID: ['3815'], |
| | | arrayRepairType: ["内部维修", "委外维修"], |
| | | |
| | | linterid: '', |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/weixiujilu/mouldRepairRecordBill?OperationType=1' |
| | | url: '/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发料:</view> |
| | | <view class="title">发出人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发料人" v-model="hform.HKeeperName" |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发出人" v-model="hform.HKeeperName" |
| | | @input="HScatterUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">领料:</view> |
| | | <view class="title">领用人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领料人" v-model="hform.HSecManagerName" |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领用人" v-model="hform.HSecManagerName" |
| | | @input="HCollectUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | |
| | | HWHID: getUserInfo().HWhID, |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | | HStockPlaceID: getUserInfo().HSPID, |
| | | HKeeperName: getUserInfo().HKeeperName, |
| | | HKeeperID: getUserInfo().HKeeperID, //发料人 |
| | | HKeeperName: getUserInfo().HEmpName, |
| | | HKeeperID: getUserInfo().HEmpID, //发料人 |
| | | HSecManagerName: getUserInfo().HEmpName, |
| | | HSecManagerID: getUserInfo().HEmpID, //领料人 |
| | | HDeptName: getUserInfo().HDeptName, |
| | |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = data[i]["HWhName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发料:</view> |
| | | <view class="title">发出人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发料人" v-model="hform.HKeeperName" |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发出人" v-model="hform.HKeeperName" |
| | | @input="HScatterUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">领料:</view> |
| | | <view class="title">领用人:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领料人" v-model="hform.HSecManagerName" |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领用人" v-model="hform.HSecManagerName" |
| | | @input="HCollectUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | |
| | | let { |
| | | operationType |
| | | } = e |
| | | if (operationType == 0) { |
| | | if (operationType == 0 || operationType == 1) { |
| | | this.getMaxNum() |
| | | this.refSav = 'Add' |
| | | } else { |
| | |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: "提交成功!" |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | |
| | | }, |
| | | onAddNewHandler() { |
| | | uni.redirectTo({ |
| | | url: "/pages/quyangdan/TakeSampleCheckBillList?operationType=0" |
| | | url: "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=1" |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单列表", |
| | | "text": "器具报废出库单列表", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList", |
| | | "id": 29, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具调拨单列表", |
| | | "text": "器具调拨单列表", |
| | | "url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "id": 30, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单列表", |
| | | "text": "器具领用出库单列表", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList", |
| | | "id": 31, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单列表", |
| | | "text": "器具领用退库单列表", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList", |
| | | "id": 32, |
| | | "hidden": false |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "模具点检记录单列表", |
| | | "text": "器具点检记录单列表", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBillList", |
| | | "id": 35, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon5.png", |
| | | "text": "模具保养记录单列表", |
| | | "text": "器具保养记录单列表", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBillList", |
| | | "id": 36, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记列表", |
| | | "text": "器具故障登记列表", |
| | | "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修派工单列表", |
| | | "text": "器具维修派工单列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "id": 38, |
| | | "hidden": false |
| | |
| | | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录列表", |
| | | "text": "器具维修记录列表", |
| | | "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "id": 39, |
| | | "hidden": false |
| | |
| | | |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修验收单列表", |
| | | "text": "器具维修验收单列表", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "id": 40, |
| | | "hidden": false |
| | |
| | | itemData: [ |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '模具档案查询', |
| | | text: '器具档案查询', |
| | | url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`, |
| | | id: 1, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon6.png', |
| | | text: '模具状态分析', |
| | | text: '器具状态分析', |
| | | tip: '查看详情', |
| | | url: '/pages/mujvzhuangtai/mujvzhuangtai', |
| | | id: 2, |
| | |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '模具寿命', |
| | | text: '器具寿命', |
| | | url: '/pages/shoujishouming/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记单", |
| | | "text": "器具故障登记单", |
| | | "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?operationType=1", |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修派工单", |
| | | "text": "器具维修派工单", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录单", |
| | | "text": "器具维修记录单", |
| | | "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修验收单", |
| | | "text": "器具维修验收单", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具点检记录单", |
| | | "text": "器具点检记录单", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养记录单", |
| | | "text": "器具保养记录单", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单", |
| | | "text": "器具领用出库单", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单", |
| | | "text": "器具领用退库单", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill", |
| | | "id": 11, |
| | | "hidden": false |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单", |
| | | "text": "器具报废出库单", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "id": 14, |
| | | "hidden": false |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养任务", |
| | | "text": "器具保养任务", |
| | | "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport", |
| | | "id": 25, |
| | | "hidden": false |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修任务", |
| | | "text": "器具维修任务", |
| | | "url": "/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport", |
| | | "id": 27, |
| | | "hidden": false |