| | |
| | | <view class="right"> |
| | | <input v-model="hform.HProcExchBillNo" placeholder="请输入工序流转卡号" /> |
| | | </view> |
| | | <view> |
| | | <uni-icons type="scan" |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;font-weight: 500;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">产品代码:</view> |
| | |
| | | <button class="op1" size="mini" plain @tap.stop="check(item)">审核</button> |
| | | <!-- <button class="op2" size="mini" plain @tap.stop="antiCheck(item)">反审核</button> --> |
| | | <button class="op1" size="mini" plain @tap.stop="firstCheck(item)" v-if="false">首检</button> |
| | | <button class="op3" size="mini" plain @tap.stop="edit(item)" v-if="true">编辑</button> |
| | | <button class="op3" size="mini" plain @tap.stop="edit(item)" v-if="hform.HStatus === '已审核'">编辑</button> |
| | | <button class="op4" size="mini" plain @tap.stop="del(item)" v-if="false">删除</button> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | | |
| | | </view> |
| | | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length != showList.length">加载中...</view> |
| | | <view class="over" v-if="listData.length != 0 && listData.length == showList.length">已到底</view> |
| | | <!-- 审核弹窗 --> |
| | | <view class="popup-mask" v-if="popupVisible" @tap="cancelCheck"> |
| | | <view class="popup-content" @tap.stop> |
| | | <view class="popup-title">审核确认</view> |
| | | <view class="popup-item"> |
| | | <text class="popup-label">数量:</text> |
| | | <input class="popup-input" type="number" v-model="popupForm.HQty" placeholder="请输入数量" /> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <text class="popup-label">制单人:</text> |
| | | <input class="popup-input" v-model="popupForm.HUser" placeholder="请输入制单人" /> |
| | | </view> |
| | | <view class="popup-btns"> |
| | | <button class="popup-btn cancel" @tap="cancelCheck">取消</button> |
| | | <button class="popup-btn confirm" @tap="confirmCheck()">确定</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | popupVisible: false, |
| | | popupItem: null, |
| | | popupForm: { |
| | | HQty: '', |
| | | HUser: '' |
| | | }, |
| | | userInfo:getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', |
| | | showmore:false, |
| | | arrayStatus:['全部','未审核','已审核','已关闭'], |
| | | hform:{ |
| | | HStatus:'全部', |
| | | HStatus:'未审核', |
| | | HBeginDate:new Date().toISOString().split('T')[0], |
| | | HEndDate:'', |
| | | HICMOBillNo:'', |
| | |
| | | let newList = list.slice(sindex,eindex) |
| | | return newList |
| | | }, |
| | | async toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | if (this.CommonUtils.isEmpty(ret.resp_result) === false) { |
| | | console.log('条码内容:' + ret.resp_result); |
| | | this.hform.HProcExchBillNo = ret.resp_result |
| | | this.search() |
| | | } |
| | | }) |
| | | }, |
| | | getList(){ |
| | | this.sWhere += ` and 制单人 like N'%${this.userInfo.Czymc}'` |
| | | // console.log(this.sWhere) |
| | | this.sWhere += ` and 制单人 like '%${this.userInfo.Czymc}'` |
| | | console.log(this.sWhere) |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }) |
| | |
| | | }, |
| | | success: (res) => { |
| | | console.log(1,res); |
| | | |
| | | if(res.data.count == 1){ |
| | | this.listData = res.data.data |
| | | this.showList = this.getPage(this.page,this.listData) |
| | |
| | | this.sWhere += " and 关闭人<>''"; |
| | | } |
| | | } |
| | | if (this.hform.HBeginDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HBeginDate + "'"; |
| | | } |
| | | if (this.hform.HEndDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HEndDate + "'"; |
| | | } |
| | | // if (this.hform.HBeginDate) { |
| | | // this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HBeginDate + "'"; |
| | | // } |
| | | // if (this.hform.HEndDate) { |
| | | // this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HEndDate + "'"; |
| | | // } |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // //审核 |
| | | // check(item){ |
| | | // console.log(item) |
| | | // if (item.HBillStatus > 0) { |
| | | //审核 |
| | | check(item){ |
| | | console.log(item) |
| | | if (item.HBillStatus > 0) { |
| | | // uni.showToast({ |
| | | // title:'单据不为未审核状态!' |
| | | // }) |
| | | this.popupItem = item; |
| | | this.popupForm.HQty = 0; |
| | | this.popupForm.HUser = uni.getStorageSync('HUserName'); |
| | | this.popupVisible = true; |
| | | } |
| | | |
| | | }, |
| | | confirmCheck(item) { |
| | | // if (!this.popupForm.HQty) { |
| | | // uni.showToast({ title: '请输入数量', icon: 'none' }); |
| | | // return; |
| | | // } |
| | | // }, |
| | | // if (!this.popupForm.HUser) { |
| | | // uni.showToast({ title: '请输入制单人', icon: 'none' }); |
| | | // return; |
| | | // } |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationEntrustOutBill/setOtherProperty', |
| | | method: 'Get', |
| | | data: { |
| | | HInterID: this.popupItem.HInterID, |
| | | HQty: this.popupForm.HQty, |
| | | user: this.popupForm.HUser // 制单人 |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.popupVisible = false; |
| | | uni.showToast({ |
| | | title: '审核成功', |
| | | icon: 'none' |
| | | }); |
| | | this.search(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | cancelCheck() { |
| | | this.popupVisible = false; |
| | | this.popupItem = null; |
| | | this.popupForm.HQty = ''; |
| | | this.popupForm.HUser = ''; |
| | | } |
| | | // //反审核 |
| | | // antiCheck(item){ |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .popup-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,0.5); |
| | | z-index: 999; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .popup-content { |
| | | width: 600rpx; |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | | padding: 30rpx; |
| | | } |
| | | .popup-title { |
| | | font-size: 36rpx; |
| | | font-weight: bold; |
| | | text-align: center; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | .popup-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .popup-label { |
| | | width: 140rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .popup-input { |
| | | flex: 1; |
| | | border: 1px solid #ccc; |
| | | border-radius: 10rpx; |
| | | padding: 10rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .popup-btns { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 40rpx; |
| | | } |
| | | .popup-btn { |
| | | width: 200rpx; |
| | | height: 70rpx; |
| | | line-height: 70rpx; |
| | | text-align: center; |
| | | border-radius: 10rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .popup-btn.cancel { |
| | | background-color: #eee; |
| | | } |
| | | .popup-btn.confirm { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | </style> |