| | |
| | | <template> |
| | | <view> |
| | | <view class="form"> |
| | | <!-- <view class="form-item"> |
| | | <view class="title">条码:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)"/> |
| | | </view> |
| | | <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | </view> --> |
| | | <!-- <view class="form-item"> |
| | | <view class="title">数量:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HQty" placeholder="请输入数量"/> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName" placeholder="不可操作"/></view> |
| | | </view> --> |
| | | <view class="form-item"> |
| | | <view class="title">条码:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | size="20" @click="toScanCode2"></uni-icons> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">数量:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HQty" placeholder="请输入数量" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName" |
| | | placeholder="不可操作" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | | <!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">选择源单</view> --> |
| | |
| | | </label> |
| | | </view> |
| | | <view v-if="tabs == 2"> |
| | | <view class="list" v-for="(item,index) in Materlist" :key="index"> |
| | | <view class="list" v-for="(item,index) in Materlist" :key="index" @tap.stop="cmdDelete(item)"> |
| | | <uni-card :title="item.物料名称" :extra="'数量:'+item.数量" style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>物料代码:</text>{{item.物料代码}} |
| | | </view> |
| | | <view class="detail" v-if="item.总数量"> |
| | | <text>总数量:</text>{{item.总数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.总数量"> |
| | | <text>总数量:</text>{{item.总数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.规格型号"> |
| | | <text>规格型号:</text>{{item.规格型号}} |
| | | </view> |
| | |
| | | <view class="detail" v-if="item.辅助属性"> |
| | | <text>辅助属性:</text>{{item.辅助属性}} |
| | | </view> |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | </view> |
| | | <view class="detail" v-if="item.生产订单号"> |
| | | <text>生产订单号:</text>{{item.生产订单号}} |
| | | </view> |
| | | |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | </view> |
| | | <view class="detail" v-if="item.生产订单号"> |
| | | <text>生产订单号:</text>{{item.生产订单号}} |
| | | </view> |
| | | |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | tabs: 1, |
| | | linterid: '', |
| | | HBillNo: '', |
| | | showHStockPlaceName: false, |
| | | |
| | | arrayHWHName: [], //仓库 |
| | | HWHNameList: [], |
| | |
| | | HSourceBarCodeCtl: "N", //是否进行源单对应条码核对('Y'为核对) |
| | | chkHBarflag: false, |
| | | HBarflag: '', |
| | | HSourceInterID: '', |
| | | HSourceEntryID: '', |
| | | |
| | | HBarCode_B: '', |
| | | HMaterName_B: '', |
| | |
| | | // this.getNewData() |
| | | this.refreshHBillNoFocus() |
| | | } |
| | | // this.getHBaseList() |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | toScanCode2() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | if(this.hform.HBarCode == '*'){ |
| | | this.hform.HBarCode = this.hform.HBarCode + ret.resp_result |
| | | }else{ |
| | | this.hform.HBarCode = ret.resp_result |
| | | } |
| | | // this.hform.HBillNo = ret.resp_result |
| | | this.getCode(ret.resp_result) |
| | | }) |
| | | }, |
| | | cmdDelete(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + item.物料名称 + ' " 所有扫码记录?删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | CommonUtils.doRequest2({ |
| | | url: "/WEBSController/set_DeleteBarCodeByEntryID_BillCheck_New_Json", |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HSourceInterID: item.HSourceInterID, |
| | | HSourceEntryID: item.HSourceEntryID, |
| | | HSourceBarCodeCtl: this.hform.HSourceBarCodeCtl |
| | | }, |
| | | resFunction: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.DisBillEntryList() |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | async refreshHBillNoFocus() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | if (this.HWHNameList[i].启用仓位 == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.showHStockPlaceName = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | sHQty = 0; |
| | | } |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/Get_BarCode_Json', |
| | | url: this.serverUrl + '/WEBSController/get_CheckTypeByBarCode_BillCheck_Json', |
| | | data: { |
| | | sBarCode: sBarCode, |
| | | HInterID: this.hform.HInterID, |
| | | HBillID: this.hform.HInterID || 0, |
| | | HBillType: this.hform.HBillType, |
| | | HBillNo: this.hform.HBillNo, |
| | | HMaker: this.hform.HMaker, |
| | | HWhID: sHWHID, |
| | | HSPID: sHSPID, |
| | | HQty: sHQty, |
| | | HRedBlueFlag: this.hform.HRedBlueFlag, |
| | | SourceFlag: HSourceFlag, |
| | | HSourceBillNo: sSourceBillNo, |
| | | HSourceBillType: sSourceBillType, |
| | | // HRedBlueFlag: this.hform.HRedBlueFlag, |
| | | // SourceFlag: HSourceFlag, |
| | | // HSourceBillNo: sSourceBillNo, |
| | | // HSourceBillType: sSourceBillType, |
| | | HStockOrgID: this.hform.HStockOrgID, |
| | | HScanStyle: "", |
| | | HCustom1: "", |
| | | HCustom2: "" |
| | | // HScanStyle: "", |
| | | // HCustom1: "", |
| | | // HCustom2: "" |
| | | }, |
| | | success: (res) => { |
| | | console.log('扫码返回', res.data); |
| | |
| | | this.tabs = 2 |
| | | } else { //物料条码 |
| | | this.tabs = 2 |
| | | console.log('data', data) |
| | | if (!this.hform.HSourceBillNo) { |
| | | this.hform.HSupName = data.hSupNameField |
| | | this.hform.HSupID = data.hSupIDField |
| | |
| | | this.hform.HDeptID = data.hDeptIDField |
| | | this.hform.HDeptName = data.hDeptNameField |
| | | } |
| | | console.log(data) |
| | | //获取源单类型、源单单号 |
| | | this.hform.HMainSourceBillType = data.hSourceBillTypeField |
| | | if (data.hSourceBillTypeField == "1103") { |
| | |
| | | var data = res.data.data |
| | | this.Materlist = data.Materlist |
| | | if (!data.BarCodeDetailslist[0].HBarCode) { |
| | | this.hform.HBarCode_B = '' |
| | | this.hform.HMaterName_B = '' |
| | | this.hform.HMaterModel_B = '' |
| | | this.hform.HBatchNo_B = '' |
| | |
| | | this.hform.HWHName_B = '' |
| | | this.hform.HSPName_B = '' |
| | | } else { |
| | | this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode |
| | | this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName |
| | | this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel |
| | | this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo |
| | |
| | | title: '单据号获取失败,错误的单据号!', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | else if (!this.Materlist || this.Materlist.length == 0) { |
| | | } else if (!this.Materlist || this.Materlist.length == 0) { |
| | | uni.showToast({ |
| | | title: '没有扫码信息,请先扫描条码,确认无误后再提交!', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | else { |
| | | } else { |
| | | var s = 0; |
| | | for (var i = 0; i < this.Materlist.length; i++) { |
| | | if (this.Materlist[i].数量 > 0) { |
| | |
| | | // icon: 'none' |
| | | // }) |
| | | // } else |
| | | { |
| | | { |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |