baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)

This commit is contained in:
Gaussian committed 2026-11-06 18:38:38 +08:00
commit c2b0e7be0d
6522 files changed
+3530643

No files matched your search

+874
View File
@@ -0,0 +1,874 @@
<template>
<view class="content">
<opsoft-dialog-notice
:dialogNoticeShow="showDialog"
:dialogNoticeType="dialogNoticeType"
:dialogNoticeTitle="dialogNoticeTitle"
:dialogNoticeContent="dialogNoticeContent"
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
>
</opsoft-dialog-notice>
<view class="allt">
<view class="detail-row-class" style="justify-content:flex-end">
<view class="detail-row-title-class" style="width: 80px;">当前组织:</view>
<view class="detail-row-white-class" style="display: flex; align-items: center; flex-direction: row;">
<picker @change="orgChange" :value="orgIndex" :range="orgArry" range-key="FNAME">
<view>{{orgArry[orgIndex].FNAME}}</view>
</picker>
<image class="detail-organzie-img-class" src="@/static/login/icon-pull.png"/>
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">条&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 码</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class"
v-model="barcodeNumber" @input="CheckBarcodeRule" @confirm="BarCodeConfirm('BarCode')"
:focus="barcodeNumberFocus" @tap="showbarcodeNumberFocus">
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">物料代码</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class" @confirm="BarCodeConfirm('itemNumber')"
v-model="itemNumber" :focus="itemNumberFocus" @tap="showitemNumberFocus">
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">物料名称</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class"
v-model="itemName" :focus="itemNameFocus" @tap="showitemNameFocus">
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 号</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class"
v-model="lot" :focus="lotFocus" @tap="showLotFocus">
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">存储位置</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class"
v-model="location" :focus="locationFocus" @tap="showlocationFocus">
</view>
</view>
<view class="detail-row-class">
<p class="detail-row-title-class">最大行数</p>
<view style="flex: 1 1;">
<input type="text" class="detail-row-white-class"
v-model="maxLength" >
</view>
</view>
</view>
<view class="example-block">
<uni-pagination style="margin-bottom:10upx;" :current="currentPage" :pageSize="pageSize" :total="total"
@change="pagechange" title="标题文字"
prev-text="上一页" next-text="下一页" />
<!-- 已扫描 @onSelect='tableSelect'-->
<view class="table">
<z-table :tableData='currentData' :columns='YESColumns' :showLoading='false' />
</view>
<view class="tip" v-if="tipShow">当前页显示10条查询信息,查看更多点击下一页</view>
</view>
<view class="header-row-btn-class">
<view class="header-row-btn-class-clear" v-show="false" @click="reset()">清空</view>
<view class="header-row-btn-class-clear" @click="reset()">清空</view>
<view class="header-row-btn-class-commit" @click="Submit()">查询</view>
</view>
</view>
</template>
<script>
import zTable from "../../../components/z-table/z-table.vue";
import uniTag from "../../../components/uni-badge/uni-badge.vue";
//分页
import uniPagination from '@/components/uni-pagination/uni-pagination.vue'
import {
mapState,
mapMutations
} from 'vuex';
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
import errorStrUntil from '@/common/errorStrUntil.js';
var _self;
export default {
data() {
return {
dialogNoticeContent:'',
dialogNoticeTitle:'',
dialogNoticeType:'',
showDialog:false,
orgArry:[{name:"请选择组织", key:"", FName:""}],
orgIndex:0,
orgFItemID:"",
barcodeNumberFocus:false,
itemNumberFocus:false,
itemNameFocus:false,
locationFocus:false,
tipShow:false,
SysTranType: 1,
isFocus: false,
//查询条件
barcodeNumber: '',
itemNumber: '',
itemName: '',
location: '',
maxLength: 200,
//分页
total: 0,
currentPage: 1,
pageSize: 10,
//总数据
totalData: [],
//当前显示数据
currentData: [],
//条码验证是否同通过
barCodeIsPass: false,
//数据列名
YESColumns: [{
title: "物料名称",
key: "FMATERIALNAME",
width: 300,
formatNum: false
}, {
title: "规格型号",
key: "FSPECIFICATION",
width: 350,
formatNum: false
}, {
title: "数量",
key: "FQTY",
width: 200,
formatNum: false
}, {
title: "批号",
key: "FLOT",
width: 350,
formatNum: false
}, {
title: "仓库",
key: "FSTOCKNUMBER",
width: 200,
formatNum: false
}, {
title: "仓库名称",
key: "FSTOCKNAME",
width: 200,
formatNum: false
}, {
title: "仓位",
key: "FSPNUMBER",
width: 200,
formatNum: false
}, {
title: "仓位名称",
key: "FSPNAME",
width: 200,
formatNum: false
}, {
title: "单位",
key: "FUNITNAME",
width: 200,
formatNum: false
}, {
title: "物料编码",
key: "FMATERIALNUMBER",
width: 350,
formatNum: false
}, {
title: "辅助属性",
key: "FAUXPROPID",
width: 350,
formatNum: false
}],
prepage: "",
lotFocus: false,
lot: ''
}
},
// onLoad() {
// _self = this;
// this.updateCacheByStorage();
// },
onLoad: function (option) {
let _self = this;
this.updateCacheByStorage();
this.showbarcodeNumberFocus();
if(option.item){
const item = JSON.parse(decodeURIComponent(option.item));
console.log(item);
this.barcodeNumber = item.barCode;
this.itemNumber = item.FItemNumber;
this.itemName = item.FItemName;
this.location = item.FLocation;
this.orgFItemID = item.orgid;
if(this.barcodeNumber || this.itemNumber || this.itemName || this.location){
this.Submit();
}
}
this.getOrgList();
if(option.prepage && option.prepage=="moreapply") {
_self.prepage = "moreapply";
}
},
onBackPress(options) {
let _self = this;
if(_self.prepage == "moreapply"){
uni.redirectTo({
url: '../../tabbar/apply/apply'
});
return true;
}
else {
return false;
}
},
components: {
zTable,
opsoftDialogNotice
},
methods: {
//test 测试添加
...mapMutations(['updateCacheByStorage']),
dialogNoticeConfirmClick(){
this.showDialog = false;
},
dialogNoticeProps(err,type){
err = errorStrUntil.handle(err);
this.showDialog = true;
this.dialogNoticeType = 'error';
this.dialogNoticeTitle = '异常提示';
if(type=='success'){
this.dialogNoticeType = 'success';
this.dialogNoticeTitle = '执行成功';
}
this.dialogNoticeContent = err;
},
orgChange(e) {
this.orgIndex = e.target.value;
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
if (!this.orgArry[this.orgIndex].FINTERID) {
this.orgFItemID = "";
} else {
this.orgFItemID = this.orgArry[this.orgIndex].FINTERID;
if (isOpenDefaultOrg) {
uni.setStorageSync('defaultOrgInfo',this.orgArry[this.orgIndex]);
}
}
this.currentData = [];
this.total = 0,
this.currentPage = 1,
this.pageSize = 10,
this.$forceUpdate();
},
getOrgList:function() {
let _self = this;
let orgInfo = uni.getStorageSync('orgInfo');
if (orgInfo && orgInfo.length > 0) {
if (!this.orgFItemID) {
let defaultOrgInfo = uni.getStorageSync('defaultOrgInfo');
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
if (!isOpenDefaultOrg) {
this.orgFItemID = orgInfo[0].FINTERID;
} else {
if (defaultOrgInfo) {
this.orgFItemID = defaultOrgInfo.FINTERID;
} else {
this.orgFItemID = orgInfo[0].FINTERID;
}
}
}
this.orgArry = orgInfo;
this.orgArry.forEach(
function(el, index){
let currentOrgid = el.FINTERID;
let result = (currentOrgid == _self.orgFItemID);
if (result) {
_self.orgIndex = index;
el.FNAME = el.FNAME?el.FNAME:'无';
}
}
);
}
},
//数据重置
reset: function() {
let _self = this;
_self.barcodeNumber = "";
_self.itemNumber = "";
_self.itemName = "";
_self.location = "";
_self.maxLength = 200;
_self.currentData = [];
_self.total = 0,
_self.currentPage = 1,
_self.pageSize = 10,
this.tipShow = false;
this.showbarcodeNumberFocus();
},
pagechange(e) {
let _self = this;
_self.currentPage = e.current
_self.DataPagnation();
},
//数据分页
DataPagnation(){
let _self = this;
var offset = (_self.currentPage - 1) * _self.pageSize;
var pageData = (offset + _self.pageSize >= _self.total) ? _self.totalData.slice(offset, _self.totalData.length) : _self.totalData.slice(offset,offset+_self.pageSize);
_self.currentData = pageData;
console.log(_self.currentData,'分页数据')
},
//条码格式验证
CheckBarcodeRule(e) {
let _self = this;
var barcode = e.target.value;
var ischeck = this.$basedata.CheckBarcodeNumber(barcode)
_self.barCodeIsPass = ischeck;
console.log(barcode, ischeck, '条码验证')
},
//条码回车
BarCodeConfirm(type) {
let _self = this;
let token = uni.getStorageInfoSync('token');
let scanType = 1;
if(type=='BarCode'){
if (_self.barcodeNumber.length == 0) {
return;
}
if(!_self.barCodeIsPass) {
uni.showToast({
icon:'none',
title:'条码不符合规则',
duration:150
})
return;
}
_self.barcodeNumber = _self.barcodeNumber.toUpperCase();
}
if(type=='itemNumber'){
scanType = 2;
}
let requestParams = {
"id": token,
"scanType":scanType,
"count": _self.maxLength,
"itemName":_self.itemName,
"itemNumber":_self.itemNumber,
"stockData":_self.location?_self.location:'',
"lot":_self.lot,
"orgid":this.orgFItemID,
barCodeNum: this.barcodeNumber
};
uni.showLoading({
icon:'loading',
title:'加载中……',
mask:true
});
this.$request.post('/STKInventory/QueryInventory',requestParams).then(res => {
uni.hideLoading();
// var data=JSON.parse(res);
let data = res
// _self.totalData = data;
if(type=='BarCode'){
_self.itemName=data.itemName;
_self.itemNumber=data.itemNumber;
_self.location=data.FLocation;
_self.lot = data.FLot;
}
if(type=='itemNumber'){
_self.itemName = data.data[0].FMATERIALNAME;
_self.location = data.data[0].FSTOCKNUMBER;
_self.lot = data.data[0].FLOT
}
}).catch(err => {
uni.hideLoading();
this.dialogNoticeProps(err,'error')
});
},
//提交事件
Submit: function() {
let _self = this;
let token = uni.getStorageInfoSync('token');
this.totalData = [];
this.currentData = [];
let requestParams = {
"id": token,
"scanType":2,
"count": _self.maxLength,
"itemName":_self.itemName,
"itemNumber":_self.itemNumber,
"stockData":_self.location?_self.location:'',
"lot":_self.lot,
"orgid":this.orgFItemID
};
uni.showLoading({
icon:'loading',
title:'加载中……',
mask:true
});
this.$request.post('/STKInventory/QueryInventory',requestParams).then(res => {
uni.hideLoading();
// var data=JSON.parse(res);
let data = res.data;
data = data.filter(
function(item) {
return item.FQTY > 0;
}
);
_self.totalData = data;
_self.total=_self.totalData.length;
_self.totalData.forEach(el=>{
if (!el.FSTOCKNAME) {
el.FSTOCKNAME = '';
}
if (!el.FSPNAME) {
el.FSPNAME = '';
}
});
_self.DataPagnation();
if(_self.total > 0){
_self.tipShow = true;
}
})
.catch(err => {
uni.hideLoading();
this.dialogNoticeProps(err,'error')
_self.total = 0,
_self.currentPage = 1,
_self.pageSize = 10,
_self.DataPagnation();
if(!_self.total){
_self.tipShow = false;
}
});
},
//聚焦
showbarcodeNumberFocus:function(){
let _self = this;
setTimeout(function(){
_self.itemNumberFocus = false;
_self.itemNameFocus = false;
_self.locationFocus = false;
_self.lotFocus = false;
},600);
setTimeout(function(){
_self.barcodeNumberFocus = true;
},500);
},
showitemNumberFocus:function(){
let _self = this;
setTimeout(function(){
_self.barcodeNumberFocus = false;
_self.itemNameFocus = false;
_self.locationFocus = false;
_self.lotFocus = false;
},600);
setTimeout(function(){
_self.itemNumberFocus = true;
},500);
},
showitemNameFocus:function(){
let _self = this;
setTimeout(function(){
_self.barcodeNumberFocus = false;
_self.itemNumberFocus = false;
_self.locationFocus = false;
_self.lotFocus = false;
},600);
setTimeout(function(){
_self.itemNameFocus = true;
},500);
},
showlocationFocus:function(){
let _self = this;
setTimeout(function(){
_self.barcodeNumberFocus = false;
_self.itemNumberFocus = false;
_self.itemNameFocus = false;
_self.lotFocus = false;
},600);
setTimeout(function(){
_self.locationFocus = true;
},500);
},
showLotFocus:function(){
let _self = this;
setTimeout(function(){
_self.barcodeNumberFocus = false;
_self.itemNumberFocus = false;
_self.itemNameFocus = false;
_self.locationFocus = false;
},600);
setTimeout(function(){
_self.lotFocus = true;
},500);
},
}
};
</script>
<style lang="scss">
.detail-organzie-content-class {
font-size: 32rpx;
font-family: MicrosoftYaHei;
color: #666666;
}
.detail-organzie-img-class {
height: 32rpx;
width: 32rpx;
margin-left: 24rpx;
}
.detail-row-class {
display: flex;
flex-wrap: nowrap;
height: 60rpx;
margin-top: 10rpx;
// background-color: #f7f9ff;
justify-content: flex-start;
align-items: center;
margin-left: 32rpx;
margin-right: 32rpx;
}
.detail-row-title-class{
width: 135rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
font-family: MicrosoftYaHei;
color: #666666;
}
.detail-row-white-class{
// width: 100%;
height: 60rpx;
border-radius: 10rpx;
border: 2rpx solid #D8D8D8;
// flex: 0 0;
font-size: 28rpx;
font-family: MicrosoftYaHei;
color: #666666;
margin-left: 24rpx;
padding-left: 24rpx;
}
.header-row-btn-class{
display: flex;
width: 100%;
height: 80rpx;
margin-top: 16rpx;
}
.header-row-btn-class-commit{
width: 50%;
position: fixed;
height: 80rpx;
line-height: 80rpx;
font-size: 32rpx;
text-align: center;
font-family: MicrosoftYaHei;
background: #5778FF;
color: #FFFFFF;
border-radius: unset;
right: 0;
bottom: 0;
}
.header-row-btn-class-clear{
width: 50%;
position: fixed;
height: 80rpx;
line-height: 80rpx;
font-size: 32rpx;
text-align: center;
font-family: MicrosoftYaHei;
background: #F5F5F4;
color: #666666;
border-radius: unset;
left: 0;
bottom: 0;
}
.opbut {
display: flex;
margin: 12upx;
}
.fuc {
display: flex;
font-size: 30upx;
text-align: center;
}
.bts {
width: 84%;
// padding: 15upx;
font-size: 30upx;
color: #f6fff9;
font-weight: 1000;
text-shadow: 2px 2px 5px #333333;
margin: 20upx;
}
// 新规范 切换tab
.lists {
display: flex;
}
.lists button {
width: 43%;
margin: 6upx;
font-size: 25upx;
// border: 1upx solid #7A7A7A;
// background: linear-gradient(to right,#cccccc,#F0F0F0,#F0F0F0);
font-weight: 500;
color: #808080;
}
.lists button {
width: 43%;
// padding: 15upx;
font-size: 25upx;
color: #f6fff9;
font-weight: 1000;
text-shadow: 2px 2px 5px #333333;
// border: 1upx solid #7A7A7A;
// background: linear-gradient(to right,#cccccc,#F0F0F0,#F0F0F0);
// font-weight: 500;
// color: #000000;
}
// 新规范 切换tab结束
//表单文字
.tr {
width: 6rem;
font-size: 15px;
color: #808080;
}
//表单文本
.in {
display: flex;
font-weight: 1000;
padding: 2rpx 0 !important;
margin: 5rpx;
}
//库存按钮
.kc {
width: 20%;
font-size: 23upx;
padding-left: 300upx;
text-align: center;
padding: 2upx;
left: 290upx;
background-color: #436EEE;
color: #FFFDEF;
}
.z-table {
text-align: center;
background-color: #F5FFFA;
font-size: 25upx;
font-weight: 1000;
text-shadow: 2px 2px 5px #f6fff9 !important;
}
.ttsp {
width: 2rem;
height: 2rem;
padding-top: -10px;
padding-left: 20px;
}
.retback {
font-size: 16px;
margin-bottom: 10px;
color: #808080;
font-weight: 1000;
// border: 2px solid #555555;
// border-radius: 3px;
// width: 3px;
// height: 20px;
// background-color: #555555;
// color: #F1F1F1
}
.bt {
font-size: 16px;
font-style: auto;
border-radius: 10px;
color: #555555;
margin-bottom: 10px;
}
.retback {
width: 3rem;
font-weight: 1000;
}
.type-select-box {
background-color: #E8E8E8;
}
.cps {
font-size: 15px;
font-style: auto;
width: 4rem;
color: #808080;
font-weight: bold;
}
.content {
// margin: 0 auto;
// padding: 20upx;
// font-size: 24rpx;
}
.title {
margin-bottom: 20rpx;
font-size: 24rpx;
color: #fff;
}
.example-block {
// padding: 10rpx;
background: #f7f9ff;
margin-top: 32rpx;
margin-left: 32rpx;
margin-right: 32rpx;
}
.example-title {
font-size: 30rpx;
font-weight: bold;
margin: 30rpx 0 10rpx;
}
.example-explain {
font-size: 24rpx;
}
.explain-title {
margin-top: 30rpx;
padding-bottom: 10rpx;
font-size: 28rpx;
border-bottom: solid 2rpx #ccc;
}
.explain-context {
margin-top: 10rpx;
color: #8f8f94;
}
.explain {
display: flex;
}
.explain-text {
flex: 1;
margin-left: 20rpx;
}
.codes {
padding: 20rpx;
background: #333;
color: #fff;
box-sizing: border-box;
}
.codes text {
white-space: nowrap;
}
.toggle-btn {
margin: 10rpx 0;
padding: 10rex;
color: #1c1;
}
.select-btn {
display: inline-block;
width: 200rpx;
margin-top: 20rpx;
font-size: 24rpx;
}
.allt {}
.type-select-box {
display: flex;
//flex-wrap: wrap;
//justify-content: space-between;
padding: 14upx;
//margin: 0 -10rpx;
background-color: #f7f9ff;
}
.showcolor {
background-color: #FFFFFF !important;
}
.disInput {
background-color: #F0F0F0 !important;
}
</style>