| pages/tiaomachaima/tiaomachaima.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/tiaomachaima/tiaomachaima2.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/xiaoshouchukujiaoyan/SellOutCheckBillList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/xiaoshoutuihuo/ICStockBillMainList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pages/tiaomachaima/tiaomachaima.vue
@@ -2,9 +2,10 @@ <view class="container"> <view class="header"> <view class="item"> <view class="left">条码编号:</view> <view class="left">{{ $t("BarCodeSplit.barCodeNo") == "BarCodeSplit.barCodeNo" ? "条码编号:" : $t("BarCodeSplit.barCodeNo") }}</view> <view class="right"> <input name="HBarCode" v-model="barCodeInfoMeta.barCodeNo" placeholder="请扫描条码" <input name="HBarCode" v-model="barCodeInfoMeta.barCodeNo" :placeholder="$t('BarCodeSplit.barCodeNoPlaceholder') == 'BarCodeSplit.barCodeNoPlaceholder' ? '请扫描条码' : $t('BarCodeSplit.barCodeNoPlaceholder')" @confirm="searchbarCodeInfo" /> </view> <view> @@ -14,85 +15,88 @@ </view> </view> <view class="item"> <view class="left">拆码数量:</view> <view class="left">{{ $t("BarCodeSplit.splitNum") == "BarCodeSplit.splitNum" ? "拆码数量:" : $t("BarCodeSplit.splitNum") }}</view> <view class="right"> <input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" placeholder="请输入拆码数量" /> <input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" :placeholder="$t('BarCodeSplit.splitNumPlaceholder') == 'BarCodeSplit.splitNumPlaceholder' ? '请输入拆码数量' : $t('BarCodeSplit.splitNumPlaceholder')" /> </view> </view> <view class="item"> <view class="left">制单人:</view> <view class="left">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}</view> <view class="right"> <input type="text" disabled name="HMaker" v-model="barCodeInfoMeta.billMaker" placeholder="请输入制单人" /> :placeholder="$t('BarCodeSplit.makerPlaceholder') == 'BarCodeSplit.makerPlaceholder' ? '请输入制单人' : $t('BarCodeSplit.makerPlaceholder')" /> </view> </view> <view class="operation-zone"> <button class="btn-c" @click="searchbarCodeInfoMeta">拆码</button> <button class="btn-c" @click="searchbarCodeInfoMeta">{{ $t("BarCodeSplit.btnSplit") == "BarCodeSplit.btnSplit" ? "拆码" : $t("BarCodeSplit.btnSplit") }}</button> <button type="default" :class="cantGenerate?'':'btn-c'" @click="SaveBarCodeCreate" :disabled="cantGenerate">生成</button> :disabled="cantGenerate">{{ $t("BarCodeSplit.btnGenerate") == "BarCodeSplit.btnGenerate" ? "生成" : $t("BarCodeSplit.btnGenerate") }}</button> </view> </view> <view class="divide"></view> <view class="content"> <view class="barcode-detail" v-show="CommonUtils.isEmpty(Object.assign(barCodeInfo, {})) === false"> <view class="title">条码信息</view> <view class="title">{{ $t("BarCodeSplit.barCodeInfoTitle") == "BarCodeSplit.barCodeInfoTitle" ? "条码信息" : $t("BarCodeSplit.barCodeInfoTitle") }}</view> <uni-card> <view class="detail"> <text>条码号:</text>{{barCodeInfo['条码编号'] || ''}} <text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "条码号:" : $t("Gy.HBarCode") }}</text>{{barCodeInfo['条码编号'] || ''}} </view> <view class="detail"> <text>原数量:</text>{{barCodeInfo['数量'] || '0'}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "原数量:" : $t("Gy.HQty") }}</text>{{barCodeInfo['数量'] || '0'}} </view> <view class="dWetail"> <text>物料编码:</text>{{barCodeInfo['物料代码'] || ''}} <text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "物料编码:" : $t("Gy.HNumber") }}</text>{{barCodeInfo['物料代码'] || ''}} </view> <view class="detail"> <text>物料名称:</text>{{barCodeInfo['物料名称'] || ''}} <text>{{ $t("Gy.HName") == "Gy.HName" ? "物料名称:" : $t("Gy.HName") }}</text>{{barCodeInfo['物料名称'] || ''}} </view> <view class="detail"> <text>规格型号:</text>{{barCodeInfo['规格型号'] || ''}} <text>{{ $t("Gy.HModel") == "Gy.HModel" ? "规格型号:" : $t("Gy.HModel") }}</text>{{barCodeInfo['规格型号'] || ''}} </view> <view class="detail"> <text>计量单位:</text>{{barCodeInfo['计量单位'] || ''}} <text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "计量单位:" : $t("Gy.HUnit") }}</text>{{barCodeInfo['计量单位'] || ''}} </view> </uni-card> </view> <view class="divide"></view> <view class="barcode-split" v-show="barCodeSplitInfo.length>0"> <view class="title">条码拆码</view> <view class="title">{{ $t("BarCodeSplit.barCodeSplitTitle") == "BarCodeSplit.barCodeSplitTitle" ? "条码拆码" : $t("BarCodeSplit.barCodeSplitTitle") }}</view> <view class="barcode-split-list" v-for="(item,index) in barCodeSplitInfo" :key="index"> <uni-card @tap="ModityHQty(item)"> <view class="detail"> <text>条码编号:</text>{{item['HBarCode'] || ''}} <text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "条码编号:" : $t("Gy.HBarCode") }}</text>{{item['HBarCode'] || ''}} </view> <view class="detail"> <text>条码数量:</text>{{item['HQty'] || '0'}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "条码数量:" : $t("Gy.HQty") }}</text>{{item['HQty'] || '0'}} </view> <view class="detail split-num"> <text>拆分数量:</text>{{item['HSplitNum'] || '0'}} <text>{{ $t("BarCodeSplit.splitNum") == "BarCodeSplit.splitNum" ? "拆分数量:" : $t("BarCodeSplit.splitNum") }}</text>{{item['HSplitNum'] || '0'}} </view> <view class="detail"> <text>物料代码:</text>{{item['HNumber'] || ''}} <text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "物料代码:" : $t("Gy.HNumber") }}</text>{{item['HNumber'] || ''}} </view> <view class="detail"> <text>物料名称:</text>{{item['HName'] || ''}} <text>{{ $t("Gy.HName") == "Gy.HName" ? "物料名称:" : $t("Gy.HName") }}</text>{{item['HName'] || ''}} </view> <view class="detail"> <text>规格型号:</text>{{item['HModel'] || ''}} <text>{{ $t("Gy.HModel") == "Gy.HModel" ? "规格型号:" : $t("Gy.HModel") }}</text>{{item['HModel'] || ''}} </view> <view class="detail"> <text>计量单位:</text>{{barCodeInfo['计量单位'] || ''}} <text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "计量单位:" : $t("Gy.HUnit") }}</text>{{barCodeInfo['计量单位'] || ''}} </view> </uni-card> </view> </view> </view> <view class="over" v-if="barCodeSplitInfo.length == 0">暂无数据</view> <view class="over" v-if="barCodeSplitInfo.length != 0">已到底</view> <view class="over" v-if="barCodeSplitInfo.length == 0">{{ $t("BarCodeSplit.noData") == "BarCodeSplit.noData" ? "暂无数据" : $t("BarCodeSplit.noData") }}</view> <view class="over" v-if="barCodeSplitInfo.length != 0">{{ $t("BarCodeSplit.bottom") == "BarCodeSplit.bottom" ? "已到底" : $t("BarCodeSplit.bottom") }}</view> <view> <!-- 输入框示例 --> <uni-popup ref="inputDialog" type="dialog"> <uni-popup-dialog ref="inputClose" mode="input" title="请输入拆码数量" :value="dialogVal" placeholder="请输入拆码数量" <uni-popup-dialog ref="inputClose" mode="input" :title="$t('BarCodeSplit.dialogTitle') == 'BarCodeSplit.dialogTitle' ? '请输入拆码数量' : $t('BarCodeSplit.dialogTitle')" :value="dialogVal" :placeholder="$t('BarCodeSplit.dialogPlaceholder') == 'BarCodeSplit.dialogPlaceholder' ? '请输入拆码数量' : $t('BarCodeSplit.dialogPlaceholder')" @confirm="dialogInputConfirm"></uni-popup-dialog> </uni-popup> </view> @@ -130,7 +134,7 @@ methods: { doRequest(url, data, resFunction, errFunction, method) { uni.showLoading({ title: '加载中...' title: this.$t('BarCodeSplit.loading') == 'BarCodeSplit.loading' ? '加载中...' : this.$t('BarCodeSplit.loading') }) uni.request({ method: method || "GET", @@ -148,7 +152,7 @@ fail: (err) => { uni.showToast({ icon: "error", title: "接口访问异常!", title: this.$t('BarCodeSplit.requestFailed') == 'BarCodeSplit.requestFailed' ? '接口访问异常!' : this.$t('BarCodeSplit.requestFailed'), duration: 2000 }) if (typeof errFunction === 'function') { @@ -167,19 +171,19 @@ if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) === true) { return uni.showToast({ icon: 'none', title: '条码编号不得为空!' title: this.$t('BarCodeSplit.barCodeNoEmpty') == 'BarCodeSplit.barCodeNoEmpty' ? '条码编号不得为空!' : this.$t('BarCodeSplit.barCodeNoEmpty') }); } if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) { return uni.showToast({ icon: 'none', title: '拆分数量不得为空!' title: this.$t('BarCodeSplit.splitNumEmpty') == 'BarCodeSplit.splitNumEmpty' ? '拆分数量不得为空!' : this.$t('BarCodeSplit.splitNumEmpty') }); } if (this.barCodeInfoMeta.splitNum > 10 || this.barCodeInfo.splitNum < 2) { if (this.barCodeInfoMeta.splitNum > 10 || this.barCodeInfoMeta.splitNum < 2) { return uni.showToast({ icon: 'none', title: '拆分数量必须在2~10之间!' title: this.$t('BarCodeSplit.splitNumRange') == 'BarCodeSplit.splitNumRange' ? '拆分数量必须在2~10之间!' : this.$t('BarCodeSplit.splitNumRange') }); } this.doRequest( @@ -208,7 +212,7 @@ if (data[0]["HQty"] < this.barCodeInfoMeta.splitNum) { return uni.showToast({ icon: 'none', title: '拆分数量大于条码数量!' title: this.$t('BarCodeSplit.splitNumExceed') == 'BarCodeSplit.splitNumExceed' ? '拆分数量大于条码数量!' : this.$t('BarCodeSplit.splitNumExceed') }); } let remainder = data[0]["HQty"] % this.barCodeInfoMeta.splitNum @@ -227,7 +231,7 @@ } else { uni.showToast({ icon: 'none', title: '没有找到对应的单据' title: this.$t('BarCodeSplit.noBillFound') == 'BarCodeSplit.noBillFound' ? '没有找到对应的单据' : this.$t('BarCodeSplit.noBillFound') }); } }, @@ -244,7 +248,7 @@ if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) { return uni.showToast({ icon: "fail", title: "条码编号不能为空!" title: this.$t('BarCodeSplit.barCodeNoEmpty') == 'BarCodeSplit.barCodeNoEmpty' ? '条码编号不能为空!' : this.$t('BarCodeSplit.barCodeNoEmpty') }) } this.doRequest( @@ -291,7 +295,7 @@ if (sum > this.barCodeInfo["HQty"]) { return uni.showToast({ icon: 'none', title: '拆码数量和不得大于条码数量' title: this.$t('BarCodeSplit.sumExceed') == 'BarCodeSplit.sumExceed' ? '拆码数量和不得大于条码数量' : this.$t('BarCodeSplit.sumExceed') }); } let msg = @@ -303,7 +307,7 @@ function(res) { this.cantGenerate = true uni.showToast({ title: '生成成功!' title: this.$t('BarCodeSplit.generateSuccess') == 'BarCodeSplit.generateSuccess' ? '生成成功!' : this.$t('BarCodeSplit.generateSuccess') }); }, function(err) { @@ -318,7 +322,7 @@ mpaasScanModule.mpaasScan({ 'hideAlbum': true, 'timeoutInterval':'10', //超时时间 'timeoutText':'未识别到二维码' //超时提醒 'timeoutText': this.$t('BarCodeSplit.timeoutText') == 'BarCodeSplit.timeoutText' ? '未识别到二维码' : this.$t('BarCodeSplit.timeoutText') },(ret) => { console.log(ret.resp_result) if (this.CommonUtils.isEmpty(ret.resp_result) === false) { pages/tiaomachaima/tiaomachaima2.vue
@@ -2,9 +2,10 @@ <view class="container"> <view class="header"> <view class="item"> <view class="left">条码编号:</view> <view class="left">{{ $t("BarCodeSplit2.barCodeNo") == "BarCodeSplit2.barCodeNo" ? "条码编号:" : $t("BarCodeSplit2.barCodeNo") }}</view> <view class="right"> <input :focus="HBarCodeFocus" v-model="barCodeInfoMeta.barCodeNo" placeholder="请扫描条码" <input :focus="HBarCodeFocus" v-model="barCodeInfoMeta.barCodeNo" :placeholder="$t('BarCodeSplit2.barCodeNoPlaceholder') == 'BarCodeSplit2.barCodeNoPlaceholder' ? '请扫描条码' : $t('BarCodeSplit2.barCodeNoPlaceholder')" @blur="searchbarCodeInfo" @confirm="searchbarCodeInfo" /> </view> <view> @@ -14,91 +15,95 @@ </view> </view> <view class="item"> <view class="left">拆码数量:</view> <view class="left">{{ $t("BarCodeSplit2.splitNumInput") == "BarCodeSplit2.splitNumInput" ? "拆码数量:" : $t("BarCodeSplit2.splitNumInput") }}</view> <view class="right"> <input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" placeholder="请输入拆码数量" /> <input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" :placeholder="$t('BarCodeSplit2.splitNumPlaceholder') == 'BarCodeSplit2.splitNumPlaceholder' ? '请输入拆码数量' : $t('BarCodeSplit2.splitNumPlaceholder')" /> </view> </view> <view class="item"> <view class="left">制单人:</view> <view class="left">{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}</view> <view class="right"> <input type="text" disabled name="HMaker" v-model="barCodeInfoMeta.billMaker" style="background-color: #e4e4e4;" placeholder="请输入制单人" /> style="background-color: #e4e4e4;" :placeholder="$t('BarCodeSplit2.makerPlaceholder') == 'BarCodeSplit2.makerPlaceholder' ? '请输入制单人' : $t('BarCodeSplit2.makerPlaceholder')" /> </view> </view> <view class="operation-zone"> <button :class="cantSplit ? 'btn-disabled' : 'btn-c'" @click="searchbarCodeInfoMeta" :disabled="cantSplit">拆码</button> :disabled="cantSplit">{{ $t("BarCodeSplit2.btnSplit") == "BarCodeSplit2.btnSplit" ? "拆码" : $t("BarCodeSplit2.btnSplit") }}</button> <button type="default" :class="cantGenerate ? 'btn-disabled' : 'btn-c'" @click="SaveBarCodeCreate" :disabled="cantGenerate">生成</button> :disabled="cantGenerate">{{ $t("BarCodeSplit2.btnGenerate") == "BarCodeSplit2.btnGenerate" ? "生成" : $t("BarCodeSplit2.btnGenerate") }}</button> <button type="default" :class="cantPrint ? 'btn-disabled' : 'btn-c'" @click="PrintHBarCode" :disabled="cantPrint">打印</button> :disabled="cantPrint">{{ $t("BarCodeSplit2.btnPrint") == "BarCodeSplit2.btnPrint" ? "打印" : $t("BarCodeSplit2.btnPrint") }}</button> </view> </view> <view class="divide"></view> <view class="content"> <view class="barcode-detail" v-show="CommonUtils.isEmpty(Object.assign(barCodeInfo, {})) === false"> <view class="title">条码信息</view> <view class="title">{{ $t("BarCodeSplit2.barCodeInfoTitle") == "BarCodeSplit2.barCodeInfoTitle" ? "条码信息" : $t("BarCodeSplit2.barCodeInfoTitle") }}</view> <uni-card> <view class="detail" style="display: none;"> <text>条码ID:</text>{{barCodeInfo['HItemID'] || '0'}} <text>{{ $t("BarCodeSplit2.barCodeID") == "BarCodeSplit2.barCodeID" ? "条码ID:" : $t("BarCodeSplit2.barCodeID") }}</text>{{barCodeInfo['HItemID'] || '0'}} </view> <view class="detail"> <text>条码编号:</text>{{barCodeInfo['条码编号'] || ''}} <text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "条码编号:" : $t("Gy.HBarCode") }}</text>{{barCodeInfo['条码编号'] || ''}} </view> <view class="detail"> <text>条码原数量:</text>{{barCodeInfo['数量'] || '0'}} <text>{{ $t("BarCodeSplit2.originalQty") == "BarCodeSplit2.originalQty" ? "条码原数量:" : $t("BarCodeSplit2.originalQty") }}</text>{{barCodeInfo['数量'] || '0'}} </view> <view class="detail"> <text>剩余数量:</text>{{barCodeInfo['剩余数量'] || '0'}} <text>{{ $t("BarCodeSplit2.remainingQty") == "BarCodeSplit2.remainingQty" ? "剩余数量:" : $t("BarCodeSplit2.remainingQty") }}</text>{{barCodeInfo['剩余数量'] || '0'}} </view> <view class="dWetail"> <text>物料编码:</text>{{barCodeInfo['物料代码'] || ''}} <text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "物料编码:" : $t("Gy.HNumber") }}</text>{{barCodeInfo['物料代码'] || ''}} </view> <view class="detail"> <text>物料名称:</text>{{barCodeInfo['物料名称'] || ''}} <text>{{ $t("Gy.HName") == "Gy.HName" ? "物料名称:" : $t("Gy.HName") }}</text>{{barCodeInfo['物料名称'] || ''}} </view> <view class="detail"> <text>规格型号:</text>{{barCodeInfo['规格型号'] || ''}} <text>{{ $t("Gy.HModel") == "Gy.HModel" ? "规格型号:" : $t("Gy.HModel") }}</text>{{barCodeInfo['规格型号'] || ''}} </view> <view class="detail"> <text>计量单位:</text>{{barCodeInfo['计量单位'] || ''}} <text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "计量单位:" : $t("Gy.HUnit") }}</text>{{barCodeInfo['计量单位'] || ''}} </view> </uni-card> </view> <view class="divide"></view> <view class="barcode-split" v-show="barCodeSplitInfo.length>0"> <view class="title">条码拆码</view> <view class="title">{{ $t("BarCodeSplit2.barCodeSplitTitle") == "BarCodeSplit2.barCodeSplitTitle" ? "条码拆码" : $t("BarCodeSplit2.barCodeSplitTitle") }}</view> <view class="barcode-split-list" v-for="(item,index) in barCodeSplitInfo" :key="index"> <uni-card @tap="ModityHQty(item)"> <view class="detail"> <text>条码编号:</text>{{item['HBarCode'] || ''}} <text>{{ $t("Gy.HBarCode") == "Gy.HBarCode" ? "条码编号:" : $t("Gy.HBarCode") }}</text>{{item['HBarCode'] || ''}} </view> <view class="detail split-num"> <text>拆分数量:</text>{{item['HSplitNum'] || '0'}} <text>{{ $t("BarCodeSplit2.splitNumLabel") == "BarCodeSplit2.splitNumLabel" ? "拆分数量:" : $t("BarCodeSplit2.splitNumLabel") }}</text>{{item['HSplitNum'] || '0'}} </view> <view class="detail"> <text>物料代码:</text>{{item['HNumber'] || ''}} <text>{{ $t("Gy.HNumber") == "Gy.HNumber" ? "物料代码:" : $t("Gy.HNumber") }}</text>{{item['HNumber'] || ''}} </view> <view class="detail"> <text>物料名称:</text>{{item['HName'] || ''}} <text>{{ $t("Gy.HName") == "Gy.HName" ? "物料名称:" : $t("Gy.HName") }}</text>{{item['HName'] || ''}} </view> <view class="detail"> <text>规格型号:</text>{{item['HModel'] || ''}} <text>{{ $t("Gy.HModel") == "Gy.HModel" ? "规格型号:" : $t("Gy.HModel") }}</text>{{item['HModel'] || ''}} </view> <view class="detail"> <text>计量单位:</text>{{barCodeInfo['计量单位'] || ''}} <text>{{ $t("Gy.HUnit") == "Gy.HUnit" ? "计量单位:" : $t("Gy.HUnit") }}</text>{{barCodeInfo['计量单位'] || ''}} </view> </uni-card> </view> </view> </view> <view class="over" v-if="barCodeSplitInfo.length == 0">暂无数据</view> <view class="over" v-if="barCodeSplitInfo.length != 0">已到底</view> <view class="over" v-if="barCodeSplitInfo.length == 0">{{ $t("BarCodeSplit2.noData") == "BarCodeSplit2.noData" ? "暂无数据" : $t("BarCodeSplit2.noData") }}</view> <view class="over" v-if="barCodeSplitInfo.length != 0">{{ $t("BarCodeSplit2.bottom") == "BarCodeSplit2.bottom" ? "已到底" : $t("BarCodeSplit2.bottom") }}</view> <view> <!-- 输入框示例 --> <uni-popup ref="inputDialog" type="dialog"> <uni-popup-dialog ref="inputClose" mode="input" title="请输入拆码数量" :value="dialogVal" placeholder="请输入拆码数量" <uni-popup-dialog ref="inputClose" mode="input" :title="$t('BarCodeSplit2.dialogTitle') == 'BarCodeSplit2.dialogTitle' ? '请输入拆码数量' : $t('BarCodeSplit2.dialogTitle')" :value="dialogVal" :placeholder="$t('BarCodeSplit2.dialogPlaceholder') == 'BarCodeSplit2.dialogPlaceholder' ? '请输入拆码数量' : $t('BarCodeSplit2.dialogPlaceholder')" @confirm="dialogInputConfirm"></uni-popup-dialog> </uni-popup> </view> @@ -155,11 +160,12 @@ barCodeSplitInfo: [], dialogVal: 0, itemCache: {}, cantGenerate: true, // 生成按钮初始禁用 cantPrint: true, // 打印按钮初始禁用 cantSplit: false, // 拆码按钮初始可用 cantGenerate: true, cantPrint: true, cantSplit: false, HBarCodeFocus: false, printInfo: "" //打印 printInfo: "", isPrinting: false // 打印状态 }; }, components: { @@ -168,7 +174,7 @@ methods: { doRequest(url, data, resFunction, errFunction, method) { uni.showLoading({ title: '加载中...' title: this.$t('BarCodeSplit2.loading') == 'BarCodeSplit2.loading' ? '加载中...' : this.$t('BarCodeSplit2.loading') }) uni.request({ method: method || "GET", @@ -186,7 +192,7 @@ fail: (err) => { uni.showToast({ icon: "error", title: "接口访问异常!", title: this.$t('BarCodeSplit2.requestFailed') == 'BarCodeSplit2.requestFailed' ? '接口访问异常!' : this.$t('BarCodeSplit2.requestFailed'), duration: 2000 }) if (typeof errFunction === 'function') { @@ -208,7 +214,7 @@ } else { innerAudioContext.src = '/static/jingbao.wav'; } innerAudioContext.play(); // 播放音频 innerAudioContext.play(); }, //光标 async refreshBarCodeState() { @@ -229,9 +235,10 @@ `/Gy_BarCodeBillList/page?sWhere= and 条码编号=''${this.barCodeInfoMeta.barCodeNo}''&user=${getUserInfo()["Czymc"]}&page=1&size=1` .toString() if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) { this.barCodeCall = false return uni.showToast({ icon: "fail", title: "条码编号不能为空!" title: this.$t('BarCodeSplit2.barCodeNoEmpty') == 'BarCodeSplit2.barCodeNoEmpty' ? '条码编号不能为空!' : this.$t('BarCodeSplit2.barCodeNoEmpty') }) } this.doRequest( @@ -246,9 +253,10 @@ if (count > 0) { this.barCodeInfo = data[0] this.barCodeSplitInfo = [] // 扫描条码后重置按钮状态 this.resetButtonState(); this.barCodeCall = false } else { this.barCodeCall = false } }, (err) => { @@ -260,38 +268,29 @@ dialogInputConfirm(val) { this.itemCache["HSplitNum"] = val // 关闭窗口后,恢复默认内容 this.$refs.inputDialog.close() }, //拆码按钮调用 async searchbarCodeInfoMeta() { this.cantGenerate = true this.cantPrint = true this.cantSplit = false // 拆码前确保拆码按钮可用 this.cantSplit = false if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) === true) { return uni.showToast({ icon: 'none', title: '条码编号不得为空!' title: this.$t('BarCodeSplit2.barCodeNoEmpty') == 'BarCodeSplit2.barCodeNoEmpty' ? '条码编号不得为空!' : this.$t('BarCodeSplit2.barCodeNoEmpty') }); } if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) { return uni.showToast({ icon: 'none', title: '拆分数量不得为空!' }); } if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) { return uni.showToast({ icon: 'none', title: '拆分数量不得为空!' title: this.$t('BarCodeSplit2.splitNumEmpty') == 'BarCodeSplit2.splitNumEmpty' ? '拆分数量不得为空!' : this.$t('BarCodeSplit2.splitNumEmpty') }); } if (parseFloat(this.barCodeInfoMeta.splitNum) > parseFloat(this.barCodeInfo['数量'])) { return uni.showToast({ icon: 'none', title: '拆分数量不能大于条码原数量!' title: this.$t('BarCodeSplit2.splitNumExceed') == 'BarCodeSplit2.splitNumExceed' ? '拆分数量不能大于条码原数量!' : this.$t('BarCodeSplit2.splitNumExceed') }); } this.doRequest( @@ -305,13 +304,11 @@ if (res.data.data.length < 1) { return uni.showToast({ icon: 'none', title: Message title: res.data.Message || this.$t('BarCodeSplit2.noBillFound') }); } //拆分条码:数量为 splitNum let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0])); let HSplitNum = this.barCodeInfoMeta.splitNum; this.barCodeSplitInfo.push({ HSplitNum: this.barCodeInfoMeta.splitNum, HBarCode: res.data.data.NextBarCode, @@ -320,17 +317,15 @@ HModel: barCodeItem1.HModel }); //更新原先条码数量 this.barCodeInfo['剩余数量'] = this.barCodeInfo['数量'] - this.barCodeInfoMeta.splitNum; // 拆码成功,禁用拆码按钮,放开生成按钮 this.cantSplit = true; this.cantGenerate = false; this.cantPrint = true; } else { uni.showToast({ icon: 'none', title: '没有找到对应的单据' title: res.data.Message || this.$t('BarCodeSplit2.noBillFound') }); } }, @@ -341,7 +336,6 @@ }, //保存方法 SaveBarCodeCreate() { // 校验拆码数量 let sum = this.barCodeSplitInfo.reduce((acc, obj) => { return acc + obj["HSplitNum"] }, 0) @@ -349,7 +343,7 @@ if (sum > this.barCodeInfo["HQty"]) { return uni.showToast({ icon: 'none', title: '拆码数量和不得大于条码数量' title: this.$t('BarCodeSplit2.sumExceed') == 'BarCodeSplit2.sumExceed' ? '拆码数量和不得大于条码数量' : this.$t('BarCodeSplit2.sumExceed') }); } let msg = @@ -360,12 +354,11 @@ }, (res) => { if (res.data.code == 1) { // 生成成功,禁用生成按钮,放开打印按钮 this.cantGenerate = true; this.cantPrint = false; this.cantSplit = true; uni.showToast({ title: '生成成功!' title: this.$t('BarCodeSplit2.generateSuccess') == 'BarCodeSplit2.generateSuccess' ? '生成成功!' : this.$t('BarCodeSplit2.generateSuccess') }); } else { this.cantGenerate = false; @@ -373,27 +366,23 @@ title: res.data.Message }); } }, (err) => { console.err(err) }, "POST" ) }, //打印按钮 // 父组件中的打印方法 async PrintHBarCode() { if (this.$printer.isConnected() === false) { this.$refs.labelPrinter.openPopup(); return; } // 防止重复点击 if (this.isPrinting) { uni.showToast({ title: '打印中,请稍候...', title: this.$t('BarCodeSplit2.printingMessage') == 'BarCodeSplit2.printingMessage' ? '打印中,请稍候...' : this.$t('BarCodeSplit2.printingMessage'), icon: 'none' }); return; @@ -405,13 +394,11 @@ let HBarCodeNoStr = `${this.barCodeSplitInfo[0]['HBarCode']}`; console.log('获取数据', HBarCodeNoStr); // 显示打印中状态 uni.showLoading({ title: '打印中...', title: this.$t('BarCodeSplit2.loadingPrint') == 'BarCodeSplit2.loadingPrint' ? '打印中...' : this.$t('BarCodeSplit2.loadingPrint'), mask: true }); // 获取打印数据 const printData = await new Promise((resolve, reject) => { uni.request({ url: this.serverUrl + '/Sc_BarCode/GetSplitBarCode_SubList', @@ -422,17 +409,16 @@ if (res.data.count == 1) { resolve(res.data.data[0]); } else { reject(new Error(res.data.Message || '未找到打印数据')); reject(new Error(res.data.Message || this.$t('BarCodeSplit2.printNoData'))); } }, fail: (err) => { reject(new Error('接口请求失败')); reject(new Error(this.$t('BarCodeSplit2.requestFailed'))); } }); }); const item = printData; // 凯贝奈特打印模板 this.printInfo = `! 0 200 200 400 1 PAGE-WIDTH 800 SETQRVER 2 @@ -464,24 +450,20 @@ console.log('printInfo: ', this.printInfo); // 等待打印组件更新 await this.$nextTick(); // 执行打印,并等待打印完成 const printResult = await this.$refs.labelPrinter.execPrint(); console.log('打印结果:', printResult); // 打印成功后重置状态 uni.hideLoading(); this.isPrinting = false; uni.showToast({ title: '打印完成', title: this.$t('BarCodeSplit2.printSuccess') == 'BarCodeSplit2.printSuccess' ? '打印完成' : this.$t('BarCodeSplit2.printSuccess'), icon: 'success', duration: 2000 }); // 播放成功提示音 CommonUtils.playSound(1); } catch (error) { @@ -490,7 +472,7 @@ this.isPrinting = false; uni.showToast({ title: error.message || '打印失败', title: error.message || this.$t('BarCodeSplit2.printFailed'), icon: 'error', duration: 2000 }); @@ -501,28 +483,25 @@ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") mpaasScanModule.mpaasScan({ 'hideAlbum': true, 'timeoutInterval': '10', //超时时间 'timeoutText': '未识别到二维码' //超时提醒 'timeoutInterval': '10', 'timeoutText': this.$t('BarCodeSplit2.timeoutText') == 'BarCodeSplit2.timeoutText' ? '未识别到二维码' : this.$t('BarCodeSplit2.timeoutText') }, (ret) => { console.log(ret.resp_result) if (this.CommonUtils.isEmpty(ret.resp_result) === false) { console.log('条码内容:' + ret.resp_result); this.barCodeInfoMeta.barCodeNo = ret.resp_result this.searchbarCodeInfo() } }) }, // 重置按钮状态方法 resetButtonState() { this.cantSplit = false; // 拆码按钮可用 this.cantGenerate = true; // 生成按钮禁用 this.cantPrint = true; // 打印按钮禁用 this.cantSplit = false; this.cantGenerate = true; this.cantPrint = true; } }, onLoad() { this.HBarCodeFocus = true; // 页面初始化时设置按钮状态 this.resetButtonState(); } } @@ -562,8 +541,6 @@ padding: 0 10rpx; gap: 20rpx; font-size: 30rpx; // height: 1.5rem; // justify-content: center; align-items: center; .left { @@ -577,7 +554,6 @@ padding: 6rpx 0; border-radius: 22rpx; border: 1px solid #e4e4e4; //background-color: #e4e4e4; >input { height: auto; pages/xiaoshouchukujiaoyan/SellOutCheckBillList.vue
@@ -1,33 +1,42 @@ <template> <view class="content"> <view class="tabs"> <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缓存列表</view> <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">已校验列表</view> <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)"> {{ $t("SellOutCheckBillList.cacheList") == "SellOutCheckBillList.cacheList" ? "缓存列表" : $t("SellOutCheckBillList.cacheList") }} </view> <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)"> {{ $t("SellOutCheckBillList.checkedList") == "SellOutCheckBillList.checkedList" ? "已校验列表" : $t("SellOutCheckBillList.checkedList") }} </view> </view> <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> <view class="form" v-if="tabs == 0"> <view class="buttons" @tap="add"> <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>新增 <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons> {{ $t("SellOutCheckBillList.btnAdd") == "SellOutCheckBillList.btnAdd" ? "新增" : $t("SellOutCheckBillList.btnAdd") }} </view> </view> <view class="form" v-if="tabs == 1"> <view class="form-item"> <view class="title">单据号:</view> <view class="title">{{ $t("SellOutCheckBillList.billNo") == "SellOutCheckBillList.billNo" ? "单据号:" : $t("SellOutCheckBillList.billNo") }}:</view> <view class="right"> <input v-model="hform.HBillNo" placeholder="请输入单据号" /> <input v-model="hform.HBillNo" :placeholder="$t('SellOutCheckBillList.billNoPlaceholder') == 'SellOutCheckBillList.billNoPlaceholder' ? '请输入单据号' : $t('SellOutCheckBillList.billNoPlaceholder')" /> </view> </view> <view class="form-item"> <view class="title">源单单号:</view> <view class="title">{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</view> <view class="right"> <input v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> <input v-model="hform.HSourceBillNo" :placeholder="$t('SellOutCheckBillList.sourceBillNoPlaceholder') == 'SellOutCheckBillList.sourceBillNoPlaceholder' ? '请输入源单单号' : $t('SellOutCheckBillList.sourceBillNoPlaceholder')" /> </view> </view> <view class="buttons"> <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> <button class="btn-c" size="mini" type="default" @tap="search">查询</button> <button class="btn-a" size="mini" type="default" @tap="clear"> {{ $t("SellOutCheckBillList.btn_Reset") == "SellOutCheckBillList.btn_Reset" ? "重置" : $t("SellOutCheckBillList.btn_Reset") }} </button> <button class="btn-c" size="mini" type="default" @tap="search"> {{ $t("SellOutCheckBillList.btn_Query") == "SellOutCheckBillList.btn_Query" ? "查询" : $t("SellOutCheckBillList.btn_Query") }} </button> </view> </view> @@ -38,28 +47,30 @@ @tap="showDetail = showDetail==index?-1:index"> <view class="card-detail"> <view class="detail" v-if="item.制单人"> <text>制单人:</text>{{item.制单人}} <text>{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}:</text>{{item.制单人}} </view> <view class="detail" v-if="item.单据内码"> <text>单据内码:</text>{{item.单据内码}} <text>{{ $t("SellOutCheckBillList.table_BillID") == "SellOutCheckBillList.table_BillID" ? "单据内码:" : $t("SellOutCheckBillList.table_BillID") }}:</text>{{item.单据内码}} </view> <view class="detail" v-if="item.数量"> <text>数量:</text>{{item.数量}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "数量:" : $t("Gy.HQty") }}:</text>{{item.数量}} </view> <view class="detail" v-if="item.源单单号"> <text>源单单号:</text>{{item.源单单号}} <text>{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</text>{{item.源单单号}} </view> <view class="detail" v-if="item.组织"> <text>组织:</text>{{item.组织}} <text>{{ $t("Gy.CurrentOrganization") == "Gy.CurrentOrganization" ? "组织:" : $t("Gy.CurrentOrganization") }}:</text>{{item.组织}} </view> </view> <view class="more"> <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)"> <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>编辑 <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("SellOutCheckBillList.btn_Edit") == "SellOutCheckBillList.btn_Edit" ? "编辑" : $t("SellOutCheckBillList.btn_Edit") }} </view> <view class="part" style="color: #da0000;" @tap.stop="del(item)"> <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons>删除 <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("SellOutCheckBillList.btn_Del") == "SellOutCheckBillList.btn_Del" ? "删除" : $t("SellOutCheckBillList.btn_Del") }} </view> </view> </uni-card> @@ -69,39 +80,46 @@ @tap="showDetail = showDetail==index?-1:index"> <view class="card-detail"> <view class="detail" v-if="item.制单人"> <text>制单人:</text>{{item.制单人}} <text>{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}:</text>{{item.制单人}} </view> <view class="detail" v-if="item.数量"> <text>数量:</text>{{item.数量}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "数量:" : $t("Gy.HQty") }}:</text>{{item.数量}} </view> <view class="detail" v-if="item.源单单号"> <text>源单单号:</text>{{item.源单单号}} <text>{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</text>{{item.源单单号}} </view> <view class="detail" v-if="item.物料代码"> <text>物料代码:</text>{{item.物料代码}} <text>{{ $t("SellOutCheckBillList.table_MaterNumber") == "SellOutCheckBillList.table_MaterNumber" ? "物料代码:" : $t("SellOutCheckBillList.table_MaterNumber") }}:</text>{{item.物料代码}} </view> <view class="detail" v-if="item.物料名称"> <text>物料名称:</text>{{item.物料名称}} <text>{{ $t("SellOutCheckBillList.table_MaterName") == "SellOutCheckBillList.table_MaterName" ? "物料名称:" : $t("SellOutCheckBillList.table_MaterName") }}:</text>{{item.物料名称}} </view> <view class="detail" v-if="item.规格型号"> <text>规格型号:</text>{{item.规格型号}} <text>{{ $t("SellOutCheckBillList.table_MaterModel") == "SellOutCheckBillList.table_MaterModel" ? "规格型号:" : $t("SellOutCheckBillList.table_MaterModel") }}:</text>{{item.规格型号}} </view> <view class="detail" v-if="item.组织"> <text>组织:</text>{{item.组织}} <text>{{ $t("Gy.CurrentOrganization") == "Gy.CurrentOrganization" ? "组织:" : $t("Gy.CurrentOrganization") }}:</text>{{item.组织}} </view> </view> <view class="more"> <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("SellOutCheckBillList.btn_Revoke") == "SellOutCheckBillList.btn_Revoke" ? "撤销" : $t("SellOutCheckBillList.btn_Revoke") }} </view> </view> </uni-card> </view> <view class="over" v-if="!listData || 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="over" v-if="!listData || listData.length == 0"> {{ $t("SellOutCheckBillList.noDate") == "SellOutCheckBillList.noDate" ? "暂无数据" : $t("SellOutCheckBillList.noDate") }} </view> <view class="over" v-if="listData.length != 0 && listData.length != showList.length"> {{ $t("SellOutCheckBillList.Loading") == "SellOutCheckBillList.Loading" ? "加载中..." : $t("SellOutCheckBillList.Loading") }} </view> <view class="over" v-if="listData.length != 0 && listData.length == showList.length"> {{ $t("SellOutCheckBillList.bottom") == "SellOutCheckBillList.bottom" ? "已到底" : $t("SellOutCheckBillList.bottom") }} </view> </view> </template> @@ -116,7 +134,7 @@ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', tabs: 0, urls: '/WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json', MvarReportTitle: '销售出库单校验缓存列表', MvarReportTitle: this.$t('SellOutCheckBillList.reportTitle') == 'SellOutCheckBillList.reportTitle' ? '销售出库单校验缓存列表' : this.$t('SellOutCheckBillList.reportTitle'), hform: { HBillNo: '', HSourceBillNo: '', @@ -169,7 +187,7 @@ fail: (res) => { console.log(res); uni.showToast({ title: '接口请求失败', title: this.$t('SellOutCheckBillList.requestFailed') == 'SellOutCheckBillList.requestFailed' ? '接口请求失败' : this.$t('SellOutCheckBillList.requestFailed'), icon: 'none' }) }, @@ -196,7 +214,7 @@ }, getList() { uni.showLoading({ title: '加载中...' title: this.$t('SellOutCheckBillList.loadingTitle') == 'SellOutCheckBillList.loadingTitle' ? '加载中...' : this.$t('SellOutCheckBillList.loadingTitle') }) uni.request({ url: this.serverUrl + this.urls, @@ -222,7 +240,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title: '接口请求失败', title: this.$t('SellOutCheckBillList.requestFailed') == 'SellOutCheckBillList.requestFailed' ? '接口请求失败' : this.$t('SellOutCheckBillList.requestFailed'), icon: 'none' }) }, @@ -298,8 +316,8 @@ del(item) { // console.log(item.hmainid,uni.getStorageSync('HUserName')) uni.showModal({ title: '提示', content: '确认要删除记录?删除后不能恢复', title: this.$t('SellOutCheckBillList.confirmTitle') == 'SellOutCheckBillList.confirmTitle' ? '提示' : this.$t('SellOutCheckBillList.confirmTitle'), content: this.$t('SellOutCheckBillList.delConfirm') == 'SellOutCheckBillList.delConfirm' ? '确认要删除记录?删除后不能恢复' : this.$t('SellOutCheckBillList.delConfirm'), success: (res) => { if (res.confirm) { console.log('用户点击确定'); @@ -328,7 +346,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title: '接口请求失败', title: this.$t('SellOutCheckBillList.requestFailed') == 'SellOutCheckBillList.requestFailed' ? '接口请求失败' : this.$t('SellOutCheckBillList.requestFailed'), icon: 'none' }) }, @@ -343,8 +361,8 @@ revoke(item) { // console.log(item.hmainid,uni.getStorageSync('HUserName')) uni.showModal({ title: '提示', content: '是否确认撤销', title: this.$t('SellOutCheckBillList.confirmTitle') == 'SellOutCheckBillList.confirmTitle' ? '提示' : this.$t('SellOutCheckBillList.confirmTitle'), content: this.$t('SellOutCheckBillList.revokeConfirm') == 'SellOutCheckBillList.revokeConfirm' ? '是否确认撤销' : this.$t('SellOutCheckBillList.revokeConfirm'), success: (res) => { if (res.confirm) { console.log('用户点击确定'); @@ -373,7 +391,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title: '接口请求失败', title: this.$t('SellOutCheckBillList.requestFailed') == 'SellOutCheckBillList.requestFailed' ? '接口请求失败' : this.$t('SellOutCheckBillList.requestFailed'), icon: 'none' }) }, pages/xiaoshoutuihuo/ICStockBillMainList.vue
@@ -1,33 +1,42 @@ <template> <view class="content"> <view class="tabs"> <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缓存列表</view> <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">已上传列表</view> <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)"> {{ $t("ICStockBillMainList.cacheList") == "ICStockBillMainList.cacheList" ? "缓存列表" : $t("ICStockBillMainList.cacheList") }} </view> <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)"> {{ $t("ICStockBillMainList.uploadedList") == "ICStockBillMainList.uploadedList" ? "已上传列表" : $t("ICStockBillMainList.uploadedList") }} </view> </view> <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> <view class="form" v-if="tabs == 0"> <view class="buttons" @tap="add"> <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>新增 <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons> {{ $t("ICStockBillMainList.btnAdd") == "ICStockBillMainList.btnAdd" ? "新增" : $t("ICStockBillMainList.btnAdd") }} </view> </view> <view class="form" v-if="tabs == 1"> <view class="form-item"> <view class="title">单据号:</view> <view class="title">{{ $t("ICStockBillMainList.billNo") == "ICStockBillMainList.billNo" ? "单据号:" : $t("ICStockBillMainList.billNo") }}:</view> <view class="right"> <input v-model="hform.HBillNo" placeholder="请输入单据号" /> <input v-model="hform.HBillNo" :placeholder="$t('ICStockBillMainList.billNoPlaceholder') == 'ICStockBillMainList.billNoPlaceholder' ? '请输入单据号' : $t('ICStockBillMainList.billNoPlaceholder')" /> </view> </view> <view class="form-item"> <view class="title">源单单号:</view> <view class="title">{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</view> <view class="right"> <input v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> <input v-model="hform.HSourceBillNo" :placeholder="$t('ICStockBillMainList.sourceBillNoPlaceholder') == 'ICStockBillMainList.sourceBillNoPlaceholder' ? '请输入源单单号' : $t('ICStockBillMainList.sourceBillNoPlaceholder')" /> </view> </view> <view class="buttons"> <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> <button class="btn-c" size="mini" type="default" @tap="search">查询</button> <button class="btn-a" size="mini" type="default" @tap="clear"> {{ $t("ICStockBillMainList.btn_Reset") == "ICStockBillMainList.btn_Reset" ? "重置" : $t("ICStockBillMainList.btn_Reset") }} </button> <button class="btn-c" size="mini" type="default" @tap="search"> {{ $t("ICStockBillMainList.btn_Query") == "ICStockBillMainList.btn_Query" ? "查询" : $t("ICStockBillMainList.btn_Query") }} </button> </view> </view> @@ -37,28 +46,30 @@ <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> <view class="card-detail"> <view class="detail" v-if="item.制单人"> <text>制单人:</text>{{item.制单人}} <text>{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}:</text>{{item.制单人}} </view> <view class="detail" v-if="item.单据内码"> <text>单据内码:</text>{{item.单据内码}} <text>{{ $t("ICStockBillMainList.table_BillID") == "ICStockBillMainList.table_BillID" ? "单据内码:" : $t("ICStockBillMainList.table_BillID") }}:</text>{{item.单据内码}} </view> <view class="detail" v-if="item.数量"> <text>数量:</text>{{item.数量}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "数量:" : $t("Gy.HQty") }}:</text>{{item.数量}} </view> <view class="detail" v-if="item.源单单号"> <text>源单单号:</text>{{item.源单单号}} <text>{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</text>{{item.源单单号}} </view> <view class="detail" v-if="item.组织"> <text>组织:</text>{{item.组织}} <text>{{ $t("Gy.CurrentOrganization") == "Gy.CurrentOrganization" ? "组织:" : $t("Gy.CurrentOrganization") }}:</text>{{item.组织}} </view> </view> <view class="more"> <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)"> <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>编辑 <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("ICStockBillMainList.btn_Edit") == "ICStockBillMainList.btn_Edit" ? "编辑" : $t("ICStockBillMainList.btn_Edit") }} </view> <view class="part" style="color: #da0000;" @tap.stop="del(item)"> <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons>删除 <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("ICStockBillMainList.btn_Del") == "ICStockBillMainList.btn_Del" ? "删除" : $t("ICStockBillMainList.btn_Del") }} </view> </view> </uni-card> @@ -67,42 +78,50 @@ <uni-card :title="item.日期" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> <view class="card-detail"> <view class="detail" v-if="item.制单人"> <text>制单人:</text>{{item.制单人}} <text>{{ $t("Gy.HMaker") == "Gy.HMaker" ? "制单人:" : $t("Gy.HMaker") }}:</text>{{item.制单人}} </view> <view class="detail" v-if="item.数量"> <text>数量:</text>{{item.数量}} <text>{{ $t("Gy.HQty") == "Gy.HQty" ? "数量:" : $t("Gy.HQty") }}:</text>{{item.数量}} </view> <view class="detail" v-if="item.源单单号"> <text>源单单号:</text>{{item.源单单号}} <text>{{ $t("Gy.HMainSourceBillNo") == "Gy.HMainSourceBillNo" ? "源单单号:" : $t("Gy.HMainSourceBillNo") }}:</text>{{item.源单单号}} </view> <view class="detail" v-if="item.物料代码"> <text>物料代码:</text>{{item.物料代码}} <text>{{ $t("ICStockBillMainList.table_MaterNumber") == "ICStockBillMainList.table_MaterNumber" ? "物料代码:" : $t("ICStockBillMainList.table_MaterNumber") }}:</text>{{item.物料代码}} </view> <view class="detail" v-if="item.物料名称"> <text>物料名称:</text>{{item.物料名称}} <text>{{ $t("ICStockBillMainList.table_MaterName") == "ICStockBillMainList.table_MaterName" ? "物料名称:" : $t("ICStockBillMainList.table_MaterName") }}:</text>{{item.物料名称}} </view> <view class="detail" v-if="item.规格型号"> <text>规格型号:</text>{{item.规格型号}} <text>{{ $t("ICStockBillMainList.table_MaterModel") == "ICStockBillMainList.table_MaterModel" ? "规格型号:" : $t("ICStockBillMainList.table_MaterModel") }}:</text>{{item.规格型号}} </view> <view class="detail" v-if="item.组织"> <text>组织:</text>{{item.组织}} <text>{{ $t("Gy.CurrentOrganization") == "Gy.CurrentOrganization" ? "组织:" : $t("Gy.CurrentOrganization") }}:</text>{{item.组织}} </view> </view> <view class="more"> <view class="part" style="color: #3a78ff;width: 100%;" @tap.stop="qrCodeDisplay(item)"> <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>显示二维码 <uni-icons type="scan" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("ICStockBillMainList.btn_DisplayCode") == "ICStockBillMainList.btn_DisplayCode" ? "显示二维码" : $t("ICStockBillMainList.btn_DisplayCode") }} </view> <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)"> <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>撤销 <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons> {{ $t("ICStockBillMainList.btn_Revoke") == "ICStockBillMainList.btn_Revoke" ? "撤销" : $t("ICStockBillMainList.btn_Revoke") }} </view> </view> </uni-card> </view> <view class="over" v-if="!listData || 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="over" v-if="!listData || listData.length == 0"> {{ $t("ICStockBillMainList.noDate") == "ICStockBillMainList.noDate" ? "暂无数据" : $t("ICStockBillMainList.noDate") }} </view> <view class="over" v-if="listData.length != 0 && listData.length != showList.length"> {{ $t("ICStockBillMainList.Loading") == "ICStockBillMainList.Loading" ? "加载中..." : $t("ICStockBillMainList.Loading") }} </view> <view class="over" v-if="listData.length != 0 && listData.length == showList.length"> {{ $t("ICStockBillMainList.bottom") == "ICStockBillMainList.bottom" ? "已到底" : $t("ICStockBillMainList.bottom") }} </view> <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> </view> </template> @@ -117,7 +136,7 @@ serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', tabs:0, urls:'/WEBSController/GetKf_PonderationBillMain_TempList_New_Json', MvarReportTitle:'销售退货单缓存列表', MvarReportTitle: this.$t('ICStockBillMainList.reportTitle') == 'ICStockBillMainList.reportTitle' ? '销售退货单缓存列表' : this.$t('ICStockBillMainList.reportTitle'), hform:{ HBillNo:'', HSourceBillNo:'', @@ -178,7 +197,7 @@ fail: (res) => { console.log(res); uni.showToast({ title:'接口请求失败', title: this.$t('ICStockBillMainList.requestFailed') == 'ICStockBillMainList.requestFailed' ? '接口请求失败' : this.$t('ICStockBillMainList.requestFailed'), icon:'none' }) }, @@ -205,7 +224,7 @@ }, getList(){ uni.showLoading({ title:'加载中...' title: this.$t('ICStockBillMainList.loadingTitle') == 'ICStockBillMainList.loadingTitle' ? '加载中...' : this.$t('ICStockBillMainList.loadingTitle') }) uni.request({ url: this.serverUrl + this.urls, @@ -231,7 +250,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title:'接口请求失败', title: this.$t('ICStockBillMainList.requestFailed') == 'ICStockBillMainList.requestFailed' ? '接口请求失败' : this.$t('ICStockBillMainList.requestFailed'), icon:'none' }) }, @@ -296,7 +315,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title:'接口请求失败', title: this.$t('ICStockBillMainList.requestFailed') == 'ICStockBillMainList.requestFailed' ? '接口请求失败' : this.$t('ICStockBillMainList.requestFailed'), icon:'none' }) }, @@ -306,8 +325,8 @@ del(item){ // console.log(item.hmainid,uni.getStorageSync('HUserName')) uni.showModal({ title: '提示', content: '确认要删除记录?删除后不能恢复', title: this.$t('ICStockBillMainList.confirmTitle') == 'ICStockBillMainList.confirmTitle' ? '提示' : this.$t('ICStockBillMainList.confirmTitle'), content: this.$t('ICStockBillMainList.delConfirm') == 'ICStockBillMainList.delConfirm' ? '确认要删除记录?删除后不能恢复' : this.$t('ICStockBillMainList.delConfirm'), success: (res) => { if (res.confirm) { console.log('用户点击确定'); @@ -334,7 +353,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title:'接口请求失败', title: this.$t('ICStockBillMainList.requestFailed') == 'ICStockBillMainList.requestFailed' ? '接口请求失败' : this.$t('ICStockBillMainList.requestFailed'), icon:'none' }) }, @@ -349,8 +368,8 @@ revoke(item){ // console.log(item.hmainid,uni.getStorageSync('HUserName')) uni.showModal({ title: '提示', content: '是否确认撤销', title: this.$t('ICStockBillMainList.confirmTitle') == 'ICStockBillMainList.confirmTitle' ? '提示' : this.$t('ICStockBillMainList.confirmTitle'), content: this.$t('ICStockBillMainList.revokeConfirm') == 'ICStockBillMainList.revokeConfirm' ? '是否确认撤销' : this.$t('ICStockBillMainList.revokeConfirm'), success: (res) => { if (res.confirm) { console.log('用户点击确定'); @@ -377,7 +396,7 @@ console.log(res); uni.hideLoading() uni.showToast({ title:'接口请求失败', title: this.$t('ICStockBillMainList.requestFailed') == 'ICStockBillMainList.requestFailed' ? '接口请求失败' : this.$t('ICStockBillMainList.requestFailed'), icon:'none' }) }, @@ -504,5 +523,4 @@ } } } </style> </style>