完善首件检验单 逻辑 添加 检验项目 任务单 流转卡 工序 产品 检验仪器选单弹出窗口
| 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="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['名称']" :extra="`代码: ${bill['代码']}`" |
| | | @tap="clickCard(bill, index)"> |
| | | <view class="item"> |
| | | <view class="left">检验项目类别: </view> |
| | | <view class="right">{{bill['检验项目类别']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">等级: </view> |
| | | <view class="right">{{bill['等级']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">禁用标记: </view> |
| | | <view class="right">{{bill['禁用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">备注: </view> |
| | | <view class="right">{{bill['备注']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用标记: </view> |
| | | <view class="right">{{bill['使用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用组织: </view> |
| | | <view class="right">{{bill['使用组织名称']}}</view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = ` and 禁用标记 !='Y' and ISNULL(审核人,'')!='' and 使用组织名称 = '${ uni.getStorageSync("Organization")}'` |
| | | |
| | | if (this.HCode) { |
| | | swhere += ` and 代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | swhere += ` and 名称 like '%${this.HName}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.curPage = 1 |
| | | CommonUtils.doRequest( |
| | | "/Gy_CheckItem/list", { |
| | | 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.HBillList = result |
| | | this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | } |
| | | |
| | | .right { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| 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" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>业务状态: </text></view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HStatusList" v-model="HStatus"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList" :key="index" :title="bill['日期']" :extra="`${bill['日期']}`" |
| | | @tap="clickCard(bill, index)"> |
| | | <view class="item-wrapper"> |
| | | <view class="item" v-if="bill['单据状态']"> |
| | | <view class="left">单据状态: </view> |
| | | <view class="right">{{bill['单据状态']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['状态']"> |
| | | <view class="left" >状态: </view> |
| | | <view class="right">{{bill['状态']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['领料状态']"> |
| | | <view class="left" >领料状态: </view> |
| | | <view class="right">{{bill['领料状态']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['是否排产']"> |
| | | <view class="left" >是否排产: </view> |
| | | <view class="right">{{bill['是否排产']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['已汇报数量']"> |
| | | <view class="left" >已汇报数量: </view> |
| | | <view class="right">{{bill['已汇报数量']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['已汇报审核数量']"> |
| | | <view class="left" >已汇报审核数量: </view> |
| | | <view class="right">{{bill['已汇报审核数量']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['工艺路线代码']"> |
| | | <view class="left" >工艺路线代码: </view> |
| | | <view class="right">{{bill['工艺路线代码']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['工艺路线']"> |
| | | <view class="left" >工艺路线: </view> |
| | | <view class="right">{{bill['工艺路线']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['齐套数量']"> |
| | | <view class="left" >齐套数量: </view> |
| | | <view class="right">{{bill['齐套数量']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['产品代码']"> |
| | | <view class="left">产品代码: </view> |
| | | <view class="right">{{bill['产品代码']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['产品名称']"> |
| | | <view class="left" >产品名称: </view> |
| | | <view class="right">{{bill['产品名称']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['规格型号']"> |
| | | <view class="left">规格型号: </view> |
| | | <view class="right">{{bill['规格型号']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['计量单位代码']"> |
| | | <view class="left" >计量单位代码: </view> |
| | | <view class="right">{{bill['计量单位代码']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['计量单位']"> |
| | | <view class="left">计量单位: </view> |
| | | <view class="right">{{bill['计量单位']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['生产任务单数量']"> |
| | | <view class="left">生产任务单数量: </view> |
| | | <view class="right">{{bill['生产任务单数量']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['流转卡数量']"> |
| | | <view class="left">流转卡数量: </view> |
| | | <view class="right">{{bill['流转卡数量']}}</view> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.length == 0">暂无数据</view> |
| | | </scroll-view> |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" :total="length" |
| | | @update:modelValue="pageUpdate"></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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HStatus: '开工', |
| | | HStatusList: ['开工', '计划', '计划确认', '下达', '全部', '完工', '结案'], |
| | | HCode: '', |
| | | HBillList: [], |
| | | HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | async pageUpdate(e) { |
| | | console.log('e: ', e); |
| | | this.curPage = e |
| | | await this.$nextTick() |
| | | this.getBillList() |
| | | }, |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = |
| | | ` and 单据状态 = '已审核' and 行状态 = '' and HPRDORGID = '${uni.getStorageSync("OrganizationID")}'` |
| | | |
| | | if (this.HBeginDate && this.HEndDate) { |
| | | sWhere += ` and CONVERT(varchar(100),日期, 23) between '${this.HBeginDate}' and '${this.HEndDate}'` |
| | | } |
| | | if (this.HCode) { |
| | | sWhere += ` and 物料编码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HStatus) { |
| | | sWhere += ` and 状态 like '%${this.HStatus}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = this.length || 0 |
| | | this.page = 0 |
| | | this.curPage = this.curPage || 1 |
| | | CommonUtils.doRequest( |
| | | "/LEMS/MES_IF_ICMOBillList_Json_byPage", { |
| | | sWhere: this.getsWhere(), |
| | | user: getUserInfo()['Czymc'], |
| | | Organization: uni.getStorageSync("Organization"), |
| | | page: this.curPage, |
| | | size: this.size |
| | | }, |
| | | (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.length = count |
| | | // const result = []; |
| | | // for (let i = 0; i < data.length; i += this.size) { |
| | | // result.push(data.slice(i, i + this.size)); |
| | | // } |
| | | this.HBillList = data |
| | | // this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | button {} |
| | | |
| | | .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; |
| | | } |
| | | |
| | | .uni-combox { |
| | | padding: 0; |
| | | height: auto; |
| | | |
| | | .uni-input-placeholder, |
| | | .uni-input-input { |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | .item-wrapper { |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | gap: 8rpx 0; |
| | | } |
| | | |
| | | view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | .left { |
| | | padding: 0 20rpx; |
| | | } |
| | | |
| | | .right {} |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| 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="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['检验仪器名称']" |
| | | :extra="`代码: ${bill['检验仪器代码']}`" @tap="clickCard(bill, index)"> |
| | | <view class="item-wrapper"> |
| | | <view class="item"> |
| | | <view class="left">校准状态: </view> |
| | | <view class="right">{{bill['校准状态']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">校准日期: </view> |
| | | <view class="right">{{dayjs(bill['校准日期']).format("YYYY-MM-DD")}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">有效日期: </view> |
| | | <view class="right">{{dayjs(bill['有效日期']).format("YYYY-MM-DD")}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">到期天数: </view> |
| | | <view class="right">{{bill['到期天数']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">禁用标志: </view> |
| | | <view class="right">{{bill['禁用标志']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['备注']"> |
| | | <view class="left">备注: </view> |
| | | <view class="right">{{bill['备注']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用状态: </view> |
| | | <view class="right">{{bill['使用状态']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用组织: </view> |
| | | <view class="right">{{bill['使用组织名称']}}</view> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = |
| | | ` and 使用组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标志 !='是' and ISNULL(审核人,'')!='' ` |
| | | |
| | | if (this.HCode) { |
| | | swhere += ` and 检验仪器代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | swhere += ` and 检验仪器名称 like '%${this.HName}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.curPage = 1 |
| | | CommonUtils.doRequest( |
| | | "/Gy_BadReason/Gy_InspectInstruMentList", { |
| | | 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.HBillList = result |
| | | this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | } |
| | | .item-wrapper{ |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | gap: 8rpx 20rpx; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | |
| | | .left { |
| | | width: 5rem; |
| | | } |
| | | |
| | | .right {} |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| 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="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>物料名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList" :key="index" :title="bill['物料名称']" |
| | | :extra="`代码: ${bill['物料代码']}`" @tap="clickCard(bill, index)"> |
| | | <view class="item-wrapper"> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['规格型号'].trim()">规格型号: </view> |
| | | <view class="right">{{bill['规格型号']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['计量单位名称']">计量单位名称: </view> |
| | | <view class="right">{{bill['计量单位名称']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['仓库名称']">仓库名称: </view> |
| | | <view class="right">{{bill['仓库名称']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['物料分类名称']">物料分类名称: </view> |
| | | <view class="right">{{bill['物料分类名称']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['物料属性']">物料属性: </view> |
| | | <view class="right">{{bill['物料属性']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['基本计量单位']">基本计量单位: </view> |
| | | <view class="right">{{bill['基本计量单位']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['事业部']">事业部: </view> |
| | | <view class="right">{{bill['事业部']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['组织名称']">组织名称: </view> |
| | | <view class="right">{{bill['组织名称']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left" v-if="bill['备注']">备注: </view> |
| | | <view class="right">{{bill['备注']}}</view> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.length == 0">暂无数据</view> |
| | | </scroll-view> |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" :total="length" |
| | | @update:modelValue="pageUpdate"></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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | async pageUpdate(e) { |
| | | console.log('e: ', e); |
| | | this.curPage = e |
| | | await this.$nextTick() |
| | | this.getBillList() |
| | | }, |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = |
| | | ` and 1=1 and 禁用标记 = '' and ISNULL(审核人,'') <> '' and HUSEORGID = '${uni.getStorageSync("OrganizationID")}'` |
| | | |
| | | if (this.HCode) { |
| | | sWhere += ` and 物料代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | sWhere += ` and 物料名称 like '%${this.HName}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = this.length || 0 |
| | | this.page = 0 |
| | | this.curPage = this.curPage || 1 |
| | | CommonUtils.doRequest( |
| | | "/Gy_Material/page", { |
| | | sWhere: this.getsWhere(), |
| | | user: getUserInfo()['Czymc'], |
| | | Organization: uni.getStorageSync("Organization"), |
| | | page: this.curPage, |
| | | size: this.size |
| | | }, |
| | | (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.length = count |
| | | // const result = []; |
| | | // for (let i = 0; i < data.length; i += this.size) { |
| | | // result.push(data.slice(i, i + this.size)); |
| | | // } |
| | | this.HBillList = data |
| | | // this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | button { |
| | | |
| | | } |
| | | .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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | .item-wrapper { |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | gap: 8rpx 0; |
| | | } |
| | | |
| | | view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | .left { |
| | | padding: 0 20rpx; |
| | | } |
| | | |
| | | .right { |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| 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" v-model="HPrdOrderBillNo" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>生产车间: </text></view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="HWorkShopList" v-model="HWorkShop"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList" :key="index" :title="bill['单据号']" :extra="`${bill['日期']}`" |
| | | @tap="clickCard(bill, index)"> |
| | | <view class="item-wrapper"> |
| | | <view class="item" v-if="bill['生产订单号']"> |
| | | <view class="left">生产订单号: </view> |
| | | <view class="right">{{bill['生产订单号']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['单据状态']"> |
| | | <view class="left">单据状态: </view> |
| | | <view class="right">{{bill['单据状态']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['产品代码']"> |
| | | <view class="left">产品代码: </view> |
| | | <view class="right">{{bill['产品代码']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['产品名称']"> |
| | | <view class="left">产品名称: </view> |
| | | <view class="right">{{bill['产品名称']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['产品规格']"> |
| | | <view class="left">产品规格: </view> |
| | | <view class="right">{{bill['产品规格']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['流转卡数量']"> |
| | | <view class="left">流转卡数量: </view> |
| | | <view class="right">{{bill['流转卡数量']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['单位']"> |
| | | <view class="left">单位: </view> |
| | | <view class="right">{{bill['单位']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['客户']"> |
| | | <view class="left">客户: </view> |
| | | <view class="right">{{bill['客户']}}</view> |
| | | </view> |
| | | <view class="item" v-if="bill['业务员']"> |
| | | <view class="left">业务员: </view> |
| | | <view class="right">{{bill['业务员']}}</view> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.length == 0">暂无数据</view> |
| | | </scroll-view> |
| | | <uni-pagination id="#pagination" title="标题文字" v-model="curPage" :pageSize="size" :total="length" |
| | | @update:modelValue="pageUpdate"></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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HWorkShop: '全部车间', |
| | | HWorkShopList: ['全部车间'], |
| | | HWorkShopValues: [], |
| | | HCode: '', |
| | | HBillList: [], |
| | | HPrdOrderBillNo: '', |
| | | HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | async pageUpdate(e) { |
| | | console.log('e: ', e); |
| | | this.curPage = e |
| | | await this.$nextTick() |
| | | this.getBillList() |
| | | }, |
| | | async popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async getDept() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Sc_ICMOBill/GetHDeptList', |
| | | data: { |
| | | "HOrgID": uni.getStorageSync("OrganizationID") |
| | | } |
| | | }) |
| | | |
| | | let {data, count, Message} = res.data |
| | | if(count == 1) { |
| | | this.HWorkShopList = ['全部车间'] |
| | | this.HWorkShopList.push(...Array.from(data).map(e => e.HName)) |
| | | this.HWorkShopValues = data |
| | | }else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化车间失败: ${Message}` |
| | | }) |
| | | } |
| | | }catch(err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化车间失败: ${err}` |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = |
| | | ` and 打印次数 >= 0 and HPRDORGID = '${uni.getStorageSync("OrganizationID")}' and ISNULL(审核人,'') != '' and ISNULL(关闭人,'')='' and HBillSubType<>'SUB'` |
| | | |
| | | if (this.HBeginDate && this.HEndDate) { |
| | | sWhere += ` and CONVERT(varchar(100),日期, 23) between '${this.HBeginDate}' and '${this.HEndDate}'` |
| | | } |
| | | if (this.HPrdOrderBillNo) { |
| | | sWhere += ` and 生产订单号 like'%${this.HPrdOrderBillNo}%` |
| | | } |
| | | if (this.HWorkShop != '全部车间') { |
| | | let workshopValue = this.HWorkShopValues.find(e => e.HName = this.HStatus ) |
| | | sWhere += ` and HWorkShopID like '%${workshopValue.HItemID}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = this.length || 0 |
| | | this.page = 0 |
| | | this.curPage = this.curPage || 1 |
| | | CommonUtils.doRequest( |
| | | "/LEMS/Sc_ProcessExchangeBillList_Query_byPage", { |
| | | sWhere: this.getsWhere(), |
| | | user: getUserInfo()['Czymc'], |
| | | Organization: uni.getStorageSync("Organization"), |
| | | page: this.curPage, |
| | | size: this.size, |
| | | HBillSubType: 3772 |
| | | }, |
| | | (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.length = count |
| | | // const result = []; |
| | | // for (let i = 0; i < data.length; i += this.size) { |
| | | // result.push(data.slice(i, i + this.size)); |
| | | // } |
| | | this.HBillList = data |
| | | // this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | button {} |
| | | |
| | | .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; |
| | | } |
| | | |
| | | .uni-combox { |
| | | padding: 0; |
| | | height: auto; |
| | | |
| | | .uni-input-placeholder, |
| | | .uni-input-input { |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: flex-end; |
| | | |
| | | >button { |
| | | display: inline-flex; |
| | | width: 4rem; |
| | | } |
| | | } |
| | | |
| | | .options-wrapper { |
| | | padding: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | |
| | | .item-wrapper { |
| | | display: flex; |
| | | flex-direction: row; |
| | | flex-wrap: wrap; |
| | | gap: 8rpx 0; |
| | | } |
| | | |
| | | view { |
| | | margin: 0 !important; |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | .left { |
| | | padding: 0 20rpx; |
| | | } |
| | | |
| | | .right {} |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| 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="right"><input type="text" v-model="HCode" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="search-condition"> |
| | | <view class="title"><text>工序名称: </text></view> |
| | | <view class="right"><input type="text" v-model="HName" @confirm="getBillList" /></view> |
| | | </view> |
| | | <view class="buttons"> |
| | | <button size="mini" type="primary" @click="search">查询</button> |
| | | <view style="flex: 1;"></view> |
| | | <button size="mini" type="primary" @click="exit">退出</button> |
| | | </view> |
| | | <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;"> |
| | | <view class="options-wrapper" v-show="HBillList.length != 0"> |
| | | <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''" |
| | | v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['工序名称']" :extra="`${bill['工序代码']}`" |
| | | @tap="clickCard(bill, index)"> |
| | | <view class="item"> |
| | | <view class="left">检验项目类别: </view> |
| | | <view class="right">{{bill['检验项目类别']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">等级: </view> |
| | | <view class="right">{{bill['等级']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">禁用标记: </view> |
| | | <view class="right">{{bill['禁用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">备注: </view> |
| | | <view class="right">{{bill['备注']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用标记: </view> |
| | | <view class="right">{{bill['使用标记']}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">使用组织: </view> |
| | | <view class="right">{{bill['使用组织名称']}}</view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-show="HBillList.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: "SampleSchemePopup", |
| | | emits: ["update:modelValue"], |
| | | data() { |
| | | return { |
| | | dayjs: dayjs, |
| | | enablefocus: false, |
| | | size: 20, |
| | | curPage: 1, |
| | | length: 0, |
| | | page: 0, |
| | | HName: '', |
| | | HCode: '', |
| | | HBillList: [], |
| | | panelHeight: 0, |
| | | |
| | | multiSouceBillList: [] |
| | | }; |
| | | }, |
| | | props: { |
| | | bindKey: { |
| | | type: [String, Number], |
| | | required: true |
| | | }, |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | }, |
| | | methods: { |
| | | popupChangeHandler(e) { |
| | | if (e.show === true) { |
| | | this.getBillList() |
| | | } |
| | | }, |
| | | async exit() { |
| | | this.size = 20 |
| | | this.curPage = 1 |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.HSourceBillNo = '' |
| | | this.HMater = '' |
| | | this.HCustom = '' |
| | | this.HBillList = [] |
| | | this.enablefocus = false |
| | | this.multiSouceBillList = [] |
| | | // 需要等待页面内的数据赋值完毕 |
| | | await this.$nextTick() |
| | | this.$refs.popup.close(); |
| | | }, |
| | | search() { |
| | | this.getBillList() |
| | | }, |
| | | showPopup() { |
| | | this.$refs.popup.open(); |
| | | }, |
| | | clickCard(bill, index) { |
| | | let retVal = {} |
| | | retVal[this.bindKey] = bill |
| | | console.log('retVal: ', retVal); |
| | | this.$emit("update", { |
| | | retVal: retVal |
| | | }) |
| | | }, |
| | | getsWhere() { |
| | | let sWhere = ` and 禁用标记 !='Y' and ISNULL(审核人,'')!='' and HUSEORGID = '${ uni.getStorageSync("OrganizationID")}'` |
| | | |
| | | if (this.HCode) { |
| | | swhere += ` and 工序代码 like '%${this.HCode}%'` |
| | | } |
| | | if (this.HName) { |
| | | swhere += ` and 工序名称 like '%${this.HName}%'` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | this.HBillList = [] |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.curPage = 1 |
| | | CommonUtils.doRequest( |
| | | "/Gy_Process/list", { |
| | | 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.HBillList = result |
| | | this.page = result.length |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.enablefocus = true |
| | | }, 500) |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 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; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | } |
| | | |
| | | .right { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "2.0.7", |
| | | "versionCode" : 207, |
| | | "versionName" : "2.0.9", |
| | | "versionCode" : 209, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | <view class="form-item"> |
| | | <view class="left">生产资源</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <uni-combox :candidates="GySourceNameList" placeholder="请选择生产资源" v-model="hform.HSourceName" |
| | | @update:modelValue="HSourceChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">生产班次</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">生产资源</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <uni-combox :candidates="GyWorkShiftNameList" placeholder="请选择生产班次" |
| | | v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">任务单号</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right disabled"> |
| | | <input type="text" :value="hform.HICMOBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 5)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">任务单数量</view> |
| | | <view class="right"> |
| | | <input type="number" value="" /> |
| | | <input type="number" v-model="hform.HICMOQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">流转卡号</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right disabled"> |
| | | <input type="text" :value="hform.HProcExchBillNo" disabled /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 6)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">流转卡数量</view> |
| | | <view class="right"> |
| | | <input type="number" value="" /> |
| | | <input type="number" v-model="hform.HProcExchQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">产品代码</view> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="hform.HMaterNumber" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">产品名称</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="hform.HMaterName" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">检验员</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="请选择检验员" |
| | | :v-model="hform.HFirstCheckEmpName" |
| | | @update:modelValue="HFirstCheckEmpChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">检验方案</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled value="" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 7)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">批号</view> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">工序</view> |
| | | <view class="right"> |
| | | <input type="text" value="" /> |
| | | <view class="right disabled"> |
| | | <input type="text" disabled :value="hform.HProcName" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"><uni-icons type="search" size="20" |
| | | @click="showSelectorModule(hform, 8)"></uni-icons></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">备注</view> |
| | |
| | | <view style="flex-shrink: 0;"><text>检验项目:</text></view> |
| | | <input type="text" :value="checkItem.HQCCheckItemName" disabled="" /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showHQCCheckItemSelector"></uni-icons></view> |
| | | @click="showSelectorModule(checkItem, 2)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0;"><text>检验仪器:</text></view> |
| | | <input type="text" :value="checkItem.HInspectInstruMentName" disabled="" /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showInspectInstruMentSelector"></uni-icons></view> |
| | | @click="showSelectorModule(checkItem, 3)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view><text>结论:</text></view> |
| | |
| | | @change="HResultChange(checkItem.num, $event)" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view class="detail editable" style="position: relative;"> |
| | | <view style="flex-shrink: 0;"><text>分析方法:</text></view> |
| | | <picker :range="arrayAnalysisMethod" range-key="name" |
| | | @change="HAnalysisMethodChange(checkItem.num, $event)"> |
| | |
| | | <view> |
| | | <switch type="checkbox" style="transform:scale(0.7);" |
| | | :checked="checkItem.HKeyInspect" |
| | | @change="HKeyInspectChange(checkItem.num, $event)" /> |
| | | @change="HKeyInspectChange(checkItem, $event)" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HQCStd"> |
| | |
| | | <text>平均值:</text>{{checkItem.HAvg}} |
| | | </view> |
| | | </view> |
| | | <view style="height: 20rpx;"></view> |
| | | <view class="more"> |
| | | <view class="part" style="color: #da0000;" @tap.stop="removeCheckItem(checkItem)"> |
| | | <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" |
| | |
| | | <view style="flex-shrink: 0;"><text>抽样方案:</text></view> |
| | | <input type="text" :value="SamplingItem.HSampleSchemeName" disabled /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showHSampleSchemeNameSelector(SamplingItem)"></uni-icons></view> |
| | | @click="showSelectorModule(SamplingItem, 1)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>抽样类型:</text>{{SamplingItem.HSamplingType}} |
| | |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <SampleSchemePopupVue ref="sampleSchemePopup" @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache"> |
| | | <SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup" |
| | | @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache"> |
| | | </SampleSchemePopupVue> |
| | | <CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup" |
| | | @update="CheckItemComplete" :bindKey="currentChechItemIDCache"> |
| | | </CheckItemPopupVue> |
| | | <InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup" |
| | | @update="InspectMentComplete" :bindKey="currentChechItemIDCache"> |
| | | </InspectMentPopupVue> |
| | | <MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete" |
| | | :bindKey="0"> |
| | | </MaterialPopupVue> |
| | | <ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete" |
| | | :bindKey="0"></ICMOBillPopupVue> |
| | | <ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup" @update="ProcExchBillComplete" |
| | | :bindKey="0"></ProcExchBillPopupVue> |
| | | <ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete" |
| | | :bindKey="0"></ProcessPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | } from '../../../utils/common' |
| | | import InspectValueTemplateVue from '@/components/ZLGL/InspectValueTemplate.vue' |
| | | import SampleSchemePopupVue from '@/components/ZLGL/SampleSchemePopup.vue' |
| | | import { getUserInfo } from '../../../utils/auth' |
| | | import CheckItemPopupVue from '@/components/ZLGL/CheckItemPopup.vue' |
| | | import InspectMentPopupVue from '../../../components/ZLGL/InspectMentPopup.vue' |
| | | import MaterialPopupVue from '../../../components/ZLGL/MaterialPopup.vue' |
| | | import ICMOBillPopupVue from '../../../components/ZLGL/ICMOBillPopup.vue' |
| | | import ProcExchBillPopupVue from '../../../components/ZLGL/ProcExchBillPopup.vue' |
| | | import ProcessPopupVue from '../../../components/ZLGL/ProcessPopup.vue' |
| | | import { |
| | | getUserInfo |
| | | } from '../../../utils/auth' |
| | | export default { |
| | | components: { |
| | | InspectValueTemplateVue, |
| | | SampleSchemePopupVue |
| | | SampleSchemePopupVue, |
| | | CheckItemPopupVue, |
| | | InspectMentPopupVue, |
| | | MaterialPopupVue, |
| | | ICMOBillPopupVue, |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | mainTabSelected: 1, |
| | | subTabSelected: 1, |
| | | |
| | | // 控制当前显示的弹窗模块 |
| | | enablePopupModule: '', |
| | | PopupModuleNameList: ["", "SampleScheme", "CheckItem", |
| | | "InspectMent", "Material", "ICMOBill", "ProcExchBill", "QCScheme", "Process" |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | | |
| | | // uni-combox 选择器使用 |
| | | // 生产资源 |
| | | GySourceList: [], |
| | | GySourceNameList: [], |
| | | // 班次 |
| | | GyWorkShiftList: [], |
| | | GyWorkShiftNameList: [], |
| | | // 检验员 |
| | | GyFirstCheckEmpList: [], |
| | | GyFirstCheckEmpNameList: [], |
| | | |
| | | // 检验方案 |
| | | arrayAnalysisMethod: [{ |
| | |
| | | "HICMOBillNo": "", |
| | | "HICMOInterID": "0", |
| | | "HICMOEntryID": "1", |
| | | "HICMOQty": "", |
| | | "HICMOQty": "0", |
| | | "HProcExchBillNo": "", |
| | | "HProcExchInterID": "0", |
| | | "HProcExchEntryID": "0", |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | async showHSampleSchemeNameSelector(item) { |
| | | this.currentChechItemIDCache = item.num |
| | | // 检验员初始化 |
| | | async InitHEmp() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Employee/list', |
| | | data: { |
| | | sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''and 审核人 !='' order by 部门代码`, |
| | | user: getUserInfo()['Czymc'], |
| | | Organization: uni.getStorageSync("Organization") |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.GyFirstCheckEmpList = data |
| | | this.GyFirstCheckEmpNameList = Array.from(data).map(e => e["职员名称"]) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化检验员失败: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化检验员失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | async HFirstCheckEmpChange(e) { |
| | | console.log('选中检验员: ', e); |
| | | let index = this.GyFirstCheckEmpList.findIndex(elem => elem["职员名称"] == e) |
| | | if (index == -1) { |
| | | this.hform.HFirstCheckEmp = 0 |
| | | this.hform.HFirstCheckEmpName = '' |
| | | return |
| | | } |
| | | |
| | | this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"] |
| | | this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["职员名称"] |
| | | }, |
| | | // 生产班次初始化 |
| | | async InitHWorkShift() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.GyWorkShiftList = data |
| | | this.GyWorkShiftNameList = Array.from(data).map(e => e["班次名称"]) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化班次失败: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化班次失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | async HWorkShiftChange(e) { |
| | | console.log('选中班次: ', e); |
| | | let index = this.GyWorkShiftList.findIndex(elem => elem["班次名称"] == e) |
| | | if (index == -1) { |
| | | this.hform.HWorkShiftID = 0 |
| | | this.hform.HWorkShiftName = '' |
| | | return |
| | | } |
| | | |
| | | this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"] |
| | | this.hform.HWorkShiftName = this.GySourceList[index]["班次名称"] |
| | | }, |
| | | // 生产资源更新 |
| | | // 生产资源初始化 |
| | | async InitHSource() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Source/list', |
| | | data: { |
| | | sWhere: `and 禁用标记 != 'Y' and ISNULL(审核人,'') != '' and HUSEORGID = '100038'`, |
| | | user: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | this.GySourceList = data |
| | | this.GySourceNameList = Array.from(data).map(e => e["生产资源名称"]) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化生产资源失败: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化生产资源失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | // 生产资源更新 |
| | | async HSourceChange(e) { |
| | | console.log('选中生产资源: ', e); |
| | | let index = this.GySourceList.findIndex(elem => elem["生产资源名称"] == e) |
| | | if (index == -1) { |
| | | this.hform.HSourceID = 0 |
| | | this.hform.HSourceName = '' |
| | | return |
| | | } |
| | | |
| | | this.hform.HSourceID = this.GySourceList[index]["HItemID"] |
| | | this.hform.HSourceName = this.GySourceList[index]["生产资源名称"] |
| | | }, |
| | | // 显示弹窗 |
| | | async showSelectorModule(item, index) { |
| | | this.currentChechItemIDCache = item.num || 0 // 0 表示没有任何子表被选中 |
| | | this.enablePopupModule = this.PopupModuleNameList[index] |
| | | console.log('this.$refs: ', this.$refs); |
| | | await this.$nextTick() |
| | | this.$refs.sampleSchemePopup.showPopup() |
| | | this.$refs.listPopup.showPopup() |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log('AnalysisMethodVal: ', val); |
| | |
| | | // 结论修改 |
| | | HResultChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2 |
| | | this.checkItems[id]["HResult"] = e.detail.value |
| | | }, |
| | | // 检验方案修改 |
| | | HAnalysisMethodChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value]["value"] |
| | | |
| | | // 检查是否可以新增检验值项 |
| | | this.setInspectValModule(this.checkItems[id]) |
| | | }, |
| | | // 重点检查修改 |
| | | HKeyInspectChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HKeyInspect"] = e.detail.value |
| | | }, |
| | | // 检验方案选择结束 |
| | | // 检验项目返回 |
| | | async CheckItemComplete(e) { |
| | | console.log('CheckItemRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.checkItems[key], { |
| | | "HQCCheckItemID": data["HItemID"], |
| | | "HQCCheckItemNumber": data["代码"], |
| | | "HQCCheckItemName": data["名称"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 检验方案返回 |
| | | async SampleSchemeComplete(e) { |
| | | console.log('SampleSchemeRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | |
| | | "HSampleDamageQty": data["样本破坏数"] || 0 |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.sampleSchemePopup.exit() |
| | | this.$refs.listPopup.exit() |
| | | this.setInspectValModule(this.checkItems[key]) |
| | | |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 检验仪器返回 |
| | | async InspectMentComplete(e) { |
| | | console.log('InspectInstruMentRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.checkItems[key], { |
| | | "HInspectInstruMentID": data["HItemID"], |
| | | "HInspectInstruMentNumber": data["检验仪器代码"], |
| | | "HInspectInstruMentName": data["检验仪器名称"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 产品代码返回 |
| | | async MaterComplete(e) { |
| | | console.log('MaterRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.hform, { |
| | | "HMaterNumber": data["物料代码"], |
| | | "HMaterName": data["物料名称"], |
| | | "HMaterID": data["HItemID"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 任务单返回 |
| | | async ICMOBillComplete(e) { |
| | | console.log('ICMOBillRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.hform, { |
| | | "HICMOInterID": data.hmainid, |
| | | "HICMOEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.单据号, |
| | | "HMaterNumber": data.产品代码, |
| | | "HMaterName": data.产品名称, |
| | | "HMaterID": data.HMaterID, |
| | | "HICMOQty": data.生产任务单数量, |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 流转卡返回 |
| | | async ProcExchBillComplete(e) { |
| | | console.log('ProcExchBillRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.hform, { |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.hsubid, |
| | | "HProcExchBillNo": data.单据号, |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 检验方案返回 |
| | | async HQCSchemeComplete(e) { |
| | | console.log('HQCSchemeRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.hform, { |
| | | // "HMaterNumber": data["物料代码"], |
| | | // "HMaterName": data["物料名称"], |
| | | // "HMaterID": data["HItemID"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | // 工序返回 |
| | | async HProcComplete(e) { |
| | | console.log(' HProcRet: ', e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | Object.assign(this.hform, { |
| | | "HProcName": data["工序名称"], |
| | | "HProcID": data["HItemID"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | } |
| | | }, |
| | | setInspectValModule(checkItem) { |
| | | console.log('checkItem: ', checkItem); |
| | | if (!checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) { |
| | | return |
| | | } |
| | | // 区分检验值页签和静态页签,检验值页签的id以_开头 |
| | | this.$set(this.InspectModules, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | checkItemId: checkItem.num |
| | | }) |
| | | console.log(' this.arrayAnalysisMethod: ', checkItem.HAnalysisMethod); |
| | | let analysisMethodName = this.arrayAnalysisMethod.find(e => e.value == checkItem.HAnalysisMethod).name |
| | | let analysisMethodName = this.arrayAnalysisMethod.find(e => e.value == checkItem.HAnalysisMethod) |
| | | .name |
| | | this.$set(this.subTabs, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | name: `${analysisMethodName}-${checkItem.HSampleSchemeName}` |
| | |
| | | } else if (this.operationType == 3) { |
| | | |
| | | } |
| | | |
| | | await this.InitHSource() |
| | | await this.InitHWorkShift() |
| | | await this.InitHEmp() |
| | | } |
| | | } |
| | | </script> |
| | |
| | | .uni-input { |
| | | padding: 0 |
| | | } |
| | | |
| | | |
| | | .bill-main-tabs, |
| | | .bill-sub-tabs { |
| | |
| | | .bill-main-content, |
| | | .bill-sub-content { |
| | | box-sizing: border-box; |
| | | padding: 0 10rpx; |
| | | padding: 0 30rpx 0 30rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | |
| | | .uni-combox { |
| | | padding: 0; |
| | | height: auto; |
| | | |
| | | .uni-input-placeholder, |
| | | .uni-input-input { |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | |
| | | .uni-combox::v-deep input { |
| | | height: inherit; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | } |
| | | |
| | | .disabled { |
| | |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper-big { |
| | | background-color: #3A78FF; |
| | | border-radius: 100%; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-shrink: 0; |
| | | margin-left: 20rpx; |
| | | |
| | | .uni-icons { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 22rpx; |
| | |
| | | text: '其他入库校验', |
| | | url: '/pages/qitarukujiaoyan/table', |
| | | id: 27, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | |
| | | "温州海诚光学": 'http://122.228.39.234:7177/API/', |
| | | "宁波惠康工业": 'http://172.16.72.30:6699/API/', |
| | | "余姚兴达起动器": 'http://121.37.133.104/API/', |
| | | "苏州卫智科技": 'http://221.224.60.42:8082/API_WW/', |
| | | "苏州卫智科技-外网": 'http://221.224.60.42:8082/API_WW/', |
| | | "苏州卫智科技-内网": 'http://172.16.20.233:8082/API_NW/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://localhost:81/API/', |
| | | }, |
| | |
| | | }, |
| | | resFunction: (res) => { |
| | | if (res.data.count == 1) { |
| | | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | }, |
| | | async refreshHBarCodeFocus() { |
| | | this.HBarCodeFocus = false |
| | | await this.$nextTick() |
| | | this.hform.HBarCode = '' |
| | | await this.$nextTick() |
| | | this.HBarCodeFocus = true |
| | | }, |
| | | async refreshHBillNoFocus() { |
| | | this.HBillNoFocus = false |
| | | this.hform.HBillNo = "" |
| | | await this.$nextTick(() => { |
| | | this.HBillNoFocus = true |
| | | this.hform.HBillNo = "" |
| | | }) |
| | | }, |
| | | playSound(e) { |
| | |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | this.refreshHBarCodeFocus() |
| | | CommonUtils.playSound(1) |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.refreshHBarCodeFocus() |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | |
| | | } catch (e) { |
| | | this.refreshHBarCodeFocus() |
| | | CommonUtils.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | uni.showToast({ |
| | |
| | | this.showHSupName = false |
| | | } |
| | | } |
| | | this.refreshHBarCodeFocus() |
| | | //显示表体明细 |
| | | this.DisBillEntryList() |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.refreshHBarCodeFocus() |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | this.refreshHBarCodeFocus() |
| | | |
| | | } catch (e) { |
| | | CommonUtils.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | this.refreshHBarCodeFocus() |
| | | uni.showToast({ |
| | | title: '接口请求失败: ' + e, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json', |
| | | // data: { |