baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+903
@@ -0,0 +1,903 @@
|
||||
<template>
|
||||
<view class="page-class">
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent="dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||||
></opsoft-dialog-notice>
|
||||
<view class="head-class">
|
||||
<view class="header-top" style="margin: 0;">
|
||||
<view class="header-top-organzie" style="">
|
||||
<text class="header-row-title-class">当前组织</text>
|
||||
<view class="header-top-organzie-select">
|
||||
<picker @change="orgChange" :value="index" :range="orgArry" range-key="FNAME" style="width: 100%;">
|
||||
<view class="header-top-organzie-content">{{ orgArry[index].FNAME }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image class="header-top-organzie-img" src="@/static/login/icon-pull.png" />
|
||||
</view>
|
||||
|
||||
<view class="header-top-date">
|
||||
<view class="header-top-data-select" @click="creatDatePicker()">{{ creatlist[0].detail }}</view>
|
||||
<!-- <image class="" src="@/static/login/icon-pull.png" style="height: 32rpx;width: 32rpx;padding-left: 10rpx;position: absolute;right: 0;"></image> -->
|
||||
<date-time-picker ref="creatTime" :indicatorStyle="indicatorStyle" :type="type" :datestring="dateString" @change="creatTimeChange"></date-time-picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="head-row-class">
|
||||
<p class="head-row-title-class">条    码</p>
|
||||
<input type="text" class="head-row-input-class" v-model="FBarCodeNO" @confirm="getBarCodeInfo()" :focus="barcodeFocus" />
|
||||
<image src="../../../static/img/scan-blue.png" @click="scan('barCodeScan')"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="space-separate-class"></view>
|
||||
|
||||
<view class="tab-lists-class">
|
||||
<view @tap="showScannedTab()" :class="[selectScannedTabFlag ? 'tab-selected-class' : 'tab-unselected-class']">已扫描</view>
|
||||
|
||||
<!-- <view class="tab-line-class" v-if="bluetoothSwitch || printSwitch" />
|
||||
<view @tap="showPrintTab()" :class="[selectPrintTabFlag ? 'tab-selected-class' : 'tab-unselected-class']" v-if="printSwitch">打印设置</view>
|
||||
<view class="tab-line-class" v-if="bluetoothSwitch && printSwitch" />
|
||||
<view @tap="showBluePrintTab()" :class="[selectBluePrintTabFlag ? 'tab-selected-class' : 'tab-unselected-class']" v-if="bluetoothSwitch">蓝牙设置</view> -->
|
||||
</view>
|
||||
|
||||
<view v-show="showPrintContentFlag">
|
||||
<NetworkPrintTab :prgkey="currentTranType" :printInfo="newIntelID" ref="networkPrintTab" :orgId="orgFItemID" :baseUrl="baseUrl" />
|
||||
</view>
|
||||
|
||||
<view v-show="showBluePrint"><BluetoothPrintTab ref="bluetoothPrintTab" :currentTranType="currentTranType" /></view>
|
||||
|
||||
<view class="table" v-show="showYesShow">
|
||||
<view class="z-table" style="padding-bottom: 100rpx;">
|
||||
<z-table :tableData="YESTableData" :columns="YESColumns" emptyText="设置了showLoading=false才会看到我" showSelect @onSelect="tableSelect" />
|
||||
</view>
|
||||
<view class="type-select-box-del" v-show="!showResult">
|
||||
<view
|
||||
@click="del()"
|
||||
style="color: #FFFFFF;border-radius: unset; background: #F76260;height: 80rpx;
|
||||
line-height: 80rpx;font-size: 32rpx; text-align: center;"
|
||||
>
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="type-select-box-commit" v-show="showResult">
|
||||
<view
|
||||
style="color: #FFFFFF;border-radius: unset;height: 80rpx;line-height: 80rpx;font-size: 32rpx; text-align: center;"
|
||||
:style="{ 'background-color': !isCommitBtnDisable ? '#4662FF' : '#808080' }"
|
||||
@click="commitBtnClick()"
|
||||
:disabled="isCommitBtnDisable"
|
||||
>
|
||||
提交
|
||||
</view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
|
||||
<view class="alter" v-show="showCashTips"></view>
|
||||
<view class="err" v-show="showCashTips">
|
||||
<view class="errTitle">温馨提示</view>
|
||||
<view class="errList"><view class="errDetails">当前页面存在未提交数据,是否需要加载</view></view>
|
||||
<view style="height: 20rpx;"></view>
|
||||
<view class="cash-btn">
|
||||
<view class="cashConfirm" @click="comfirmHideCashTips">确定</view>
|
||||
<view class="cashCancel" @click="cancelHideCashTips">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
|
||||
import BluetoothPrintTab from '@/components/bluetooth-print-tab/bluetooth-print-tab.vue';
|
||||
import NetworkPrintTab from '@/components/network-print-tab/network-print-tab.vue';
|
||||
import DateTimePicker from '@/components/bory-dateTimePickerWithOutTime/bory-dateTimePickerWithOutTime.vue';
|
||||
const commonUtil = require('../../../common/util.js');
|
||||
let _self;
|
||||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||||
export default {
|
||||
components: {
|
||||
BluetoothPrintTab,
|
||||
NetworkPrintTab,
|
||||
DateTimePicker,
|
||||
opsoftDialogNotice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
billNO: '',
|
||||
billInfo: [],
|
||||
billQty: 0,
|
||||
billSubmitQty: 0,
|
||||
dialogNoticeContent: '',
|
||||
dialogNoticeTitle: '',
|
||||
dialogNoticeType: '',
|
||||
showDialog: false,
|
||||
// 日期选择
|
||||
dateString: '',
|
||||
type: 'date',
|
||||
creatlist: [
|
||||
{
|
||||
type: 'date',
|
||||
detail: '选择开始时间'
|
||||
}
|
||||
],
|
||||
curDate: '',
|
||||
|
||||
dbAlise: '',
|
||||
userName: '',
|
||||
isChangedOrg: false,
|
||||
showScan: true,
|
||||
barcodeDisable: false,
|
||||
currentTranType: 'StockTaking',
|
||||
showCashTips: false,
|
||||
loadCash: false,
|
||||
pageCashInfo: new Object(),
|
||||
barcodeExistList: [],
|
||||
FUnitID: '',
|
||||
showOrgFlag: true,
|
||||
orgArry: [{ name: '请选择组织', key: '', FName: '' }],
|
||||
orgFItemID: '',
|
||||
index: 0,
|
||||
barcodeFocus: false,
|
||||
qtyFocus: false,
|
||||
showResult: true,
|
||||
selectScannedTabFlag: true,
|
||||
selectBluePrintTabFlag: false,
|
||||
selectPrintTabFlag: false,
|
||||
isCommitBtnDisable: false,
|
||||
currentBillType: 1,
|
||||
isMixed: false,
|
||||
showYesShow: true,
|
||||
showPrintContentFlag: false,
|
||||
YESTableData: [],
|
||||
qtyDisable: true,
|
||||
FBarCodeNO: null,
|
||||
FBoxCodeNO: null,
|
||||
currentBarcodeNO: null,
|
||||
FQty: null,
|
||||
//已扫描
|
||||
YESColumns: [
|
||||
{ title: '车号', key: 'FNO', width: 500, formatNum: false },
|
||||
{ title: '条码', key: 'Barcode', width: 500, formatNum: false },
|
||||
{ title: '数量', key: 'Qty', width: 100, formatNum: false }
|
||||
],
|
||||
barcodeDataTempList: [],
|
||||
commitDataList: [],
|
||||
selectedList: [],
|
||||
showBluePrint: false,
|
||||
mixedDisabled: false,
|
||||
baseUrl: '',
|
||||
selectBarcodeTabFlag: false,
|
||||
barcodeTableData: [
|
||||
// {barcode: '123456',status:'已合并'}
|
||||
],
|
||||
barcodeColumns: [{ title: '条码', key: 'barcode', width: 500, formatNum: false }, { title: '状态', key: 'status', width: 300, formatNum: false }],
|
||||
printList: [],
|
||||
isPrinted: true,
|
||||
printSwitch: false,
|
||||
bluetoothSwitch: false,
|
||||
systemParameter: null,
|
||||
newIntelID: '',
|
||||
codeType: 0,
|
||||
codeTypeList: [],
|
||||
codeTypeSelectText: '箱码'
|
||||
};
|
||||
},
|
||||
|
||||
onBackPress(options) {
|
||||
uni.redirectTo({
|
||||
url: '../../tabbar/apply/apply'
|
||||
});
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
let _self = this;
|
||||
this.dbAlise = uni.getStorageSync('dbAlise');
|
||||
this.userName = uni.getStorageSync('userName');
|
||||
// _self.showbarCodeFocus();
|
||||
_self.getOrgList();
|
||||
_self.baseUrl = uni.getStorageSync('RequestUrl');
|
||||
|
||||
_self.systemParameter = uni.getStorageSync('systemParameter');
|
||||
_self.printSwitch = _self.systemParameter.printSwitch;
|
||||
_self.bluetoothSwitch = _self.systemParameter.bluetoothSwitch;
|
||||
|
||||
this.judgeCash();
|
||||
//当前时间
|
||||
let date = new Date();
|
||||
this.curDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
||||
this.creatlist[0].detail = this.curDate;
|
||||
},
|
||||
onReady() {
|
||||
if (this.$refs.bluetoothPrintTab) {
|
||||
this.$refs.bluetoothPrintTab.orgId = this.orgFItemID;
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
indicatorStyle() {
|
||||
return {
|
||||
background: 'rgba(255,0,0,.2)',
|
||||
height: '40px'
|
||||
};
|
||||
},
|
||||
...mapState(['sysParameters', 'userInfo'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
showFocus(focusType) {
|
||||
let _self = this;
|
||||
this.barcodeFocus = false;
|
||||
if(focusType == 'barCodeScan') {
|
||||
this.$nextTick(() => {
|
||||
_self.barcodeFocus = true;
|
||||
})
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
//日期切换
|
||||
creatDatePicker() {
|
||||
this.type = 'date';
|
||||
this.$refs['creatTime'].show();
|
||||
},
|
||||
|
||||
creatTimeChange(value) {
|
||||
let item = this.creatlist[0];
|
||||
item['detail'] = value;
|
||||
},
|
||||
scan: function(e) {
|
||||
let _self = this;
|
||||
let currentScanType = e;
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
if (currentScanType == 'barCodeScan') {
|
||||
_self.FBarCodeNO = res.result;
|
||||
_self.getBarCodeInfo();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
loadByCash: function() {
|
||||
let _self = this;
|
||||
let lastSaveOrgid = uni.getStorageSync(this.dbAlise + this.userName + this.currentTranType + 'lastSaveOrgid');
|
||||
let cashValue;
|
||||
if (!this.isChangedOrg) {
|
||||
cashValue = uni.getStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + lastSaveOrgid);
|
||||
} else {
|
||||
cashValue = uni.getStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + this.orgFItemID);
|
||||
}
|
||||
this.orgFItemID = cashValue.otherInfo.orgFItemID;
|
||||
this.YESTableData = cashValue.YESTableData;
|
||||
this.barcodeTableData = cashValue.barcodeTableData;
|
||||
this.barcodeExistList = cashValue.barcodeExistList;
|
||||
this.commitDataList = cashValue.commitDataList;
|
||||
this.currentBarcodeNO = cashValue.otherInfo.currentBarcodeNO;
|
||||
|
||||
},
|
||||
//组织
|
||||
getOrgList: function() {
|
||||
let _self = this;
|
||||
let orgInfo = uni.getStorageSync('orgInfo');
|
||||
|
||||
if (orgInfo && orgInfo.length > 0) {
|
||||
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.index = index;
|
||||
el.FNAME = el.FNAME ? el.FNAME : '无';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.orgArry = [{ name: '请选择组织', key: '', FNAME: '当前无组织' }];
|
||||
this.index = 0;
|
||||
}
|
||||
},
|
||||
|
||||
orgChange: function(e) {
|
||||
this.isChangedOrg = true;
|
||||
this.index = e.target.value;
|
||||
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
|
||||
if (!this.orgArry[this.index].FINTERID) {
|
||||
this.orgFItemID = '';
|
||||
} else {
|
||||
this.orgFItemID = this.orgArry[this.index].FINTERID;
|
||||
if (isOpenDefaultOrg) {
|
||||
uni.setStorageSync('defaultOrgInfo', this.orgArry[this.index]);
|
||||
}
|
||||
}
|
||||
|
||||
let cashValue = uni.getStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + this.orgFItemID);
|
||||
if (cashValue) {
|
||||
this.loadByCash();
|
||||
} else {
|
||||
this.orgChangedClear();
|
||||
}
|
||||
|
||||
this.$refs.bluetoothPrintTab.orgId = this.orgFItemID;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
orgChangedClear: function() {
|
||||
this.billNO = '';
|
||||
this.FBarCodeNO = '';
|
||||
this.FUnitID = '';
|
||||
this.showResult = true;
|
||||
|
||||
this.YESTableData = [];
|
||||
this.commitDataList = [];
|
||||
this.barcodeTableData = [];
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
getBarCodeInfo: function() {
|
||||
let _self = this;
|
||||
let isExit = this.YESTableData.findIndex(f => f.Barcode == _self.FBarCodeNO);
|
||||
if(isExit != -1) {
|
||||
uni.showToast({
|
||||
title: '条码已在已扫码列表',
|
||||
icon: "none"
|
||||
})
|
||||
this.FBarCodeNO = '';
|
||||
this.showFocus('barCodeScan');
|
||||
return
|
||||
}
|
||||
|
||||
let requestParams = {
|
||||
barcode: this.FBarCodeNO,
|
||||
orgId: this.orgFItemID
|
||||
};
|
||||
uni.showLoading({
|
||||
icon: 'loading',
|
||||
title: '加载中……',
|
||||
mask: true
|
||||
});
|
||||
this.$request.get('/Barcode/GetStockTakingBarcodeInfo', {
|
||||
params: requestParams
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
let barInfo = {
|
||||
FNO: res.FMODELNO ? res.FMODELNO : '',
|
||||
Barcode: this.FBarCodeNO ? this.FBarCodeNO : '',
|
||||
Qty: 1,
|
||||
}
|
||||
this.YESTableData.push(barInfo);
|
||||
this.FBarCodeNO = '';
|
||||
this.showFocus('barCodeScan');
|
||||
uni.hideLoading();
|
||||
}).catch(err => {
|
||||
// 包含条码【】信息未找到,条码写入已扫描,其他报异常
|
||||
uni.hideLoading();
|
||||
if(err.message.includes(`条码【${this.FBarCodeNO}】信息未找到`)) {
|
||||
uni.showToast({
|
||||
title: '条码信息未找到',
|
||||
icon: 'none'
|
||||
})
|
||||
this.FBarCodeNO = '';
|
||||
this.showFocus('barCodeScan');
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '条码已存在',
|
||||
icon: 'none'
|
||||
})
|
||||
this.FBarCodeNO = '';
|
||||
this.showFocus('barCodeScan');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
commitBtnClick: function() {
|
||||
let _self = this;
|
||||
if (this.isCommitBtnDisable) {
|
||||
return;
|
||||
}
|
||||
this.isCommitBtnDisable = true;
|
||||
if (this.YESTableData.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '无提交数据',
|
||||
duration: 2500
|
||||
});
|
||||
|
||||
this.isCommitBtnDisable = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
let userID = this.userInfo.token;
|
||||
let requestParams = {
|
||||
InBoxInfo: this.YESTableData,
|
||||
orgid:this.orgFItemID,
|
||||
TranType: 'StockTaking'
|
||||
};
|
||||
this.submit(requestParams);
|
||||
},
|
||||
|
||||
submit(requestParams) {
|
||||
let _self = this;
|
||||
uni.showLoading({
|
||||
icon: 'loading',
|
||||
title: '加载中……',
|
||||
mask: true
|
||||
});
|
||||
console.log(requestParams);
|
||||
this.$request
|
||||
.post('/Barcode/ImportStockTakingBarCode', requestParams)
|
||||
.then(res => {
|
||||
this.isCommitBtnDisable = false;
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
content: res,
|
||||
confirmText: '确定',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.commitDataList.splice(0, this.commitDataList.length);
|
||||
this.YESTableData.splice(0, this.YESTableData.length);
|
||||
this.FBarCodeNO = '';
|
||||
this.FQty = '';
|
||||
this.FNO = '';
|
||||
this.$forceUpdate();
|
||||
this.showFocus('barCodeScan')
|
||||
// if (this.FBoxCodeNO && this.isPrinted) {
|
||||
// let tempArray = [];
|
||||
// tempArray.push(this.FBoxCodeNO);
|
||||
// if (this.printSwitch) {
|
||||
// this.printBarcode(tempArray);
|
||||
// }
|
||||
// if (!this.printSwitch && this.bluetoothSwitch) {
|
||||
// this.bluePrintBarcode(tempArray);
|
||||
// }
|
||||
// }
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
uni.removeStorageSync(this.dbAlise + this.userName + this.currentTranType + 'lastSaveOrgid');
|
||||
uni.removeStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + this.orgFItemID);
|
||||
})
|
||||
.catch(err => {
|
||||
this.isCommitBtnDisable = false;
|
||||
uni.hideLoading();
|
||||
this.dialogNoticeProps(err, 'error');
|
||||
});
|
||||
},
|
||||
|
||||
//已扫描
|
||||
showScannedTab: function() {
|
||||
this.showPrintContentFlag = false;
|
||||
this.showYesShow = true;
|
||||
this.selectScannedTabFlag = true;
|
||||
this.selectPrintTabFlag = false;
|
||||
this.selectBluePrintTabFlag = false;
|
||||
this.showBluePrint = false;
|
||||
this.selectBarcodeTabFlag = false;
|
||||
},
|
||||
|
||||
//正操作
|
||||
showPrintTab: function() {
|
||||
this.showPrintContentFlag = true;
|
||||
this.showYesShow = false;
|
||||
this.selectScannedTabFlag = false;
|
||||
this.selectPrintTabFlag = true;
|
||||
this.selectBluePrintTabFlag = false;
|
||||
this.showBluePrint = false;
|
||||
this.selectBarcodeTabFlag = false;
|
||||
},
|
||||
|
||||
showBarcodeTab: function() {
|
||||
this.selectBarcodeTabFlag = true;
|
||||
this.showPrintContentFlag = false;
|
||||
this.showYesShow = false;
|
||||
this.selectScannedTabFlag = false;
|
||||
this.selectPrintTabFlag = false;
|
||||
this.selectBluePrintTabFlag = false;
|
||||
this.showBluePrint = false;
|
||||
},
|
||||
|
||||
showBluePrintTab: function() {
|
||||
this.showPrintContentFlag = false;
|
||||
this.showYesShow = false;
|
||||
this.selectScannedTabFlag = false;
|
||||
this.selectPrintTabFlag = false;
|
||||
this.selectBluePrintTabFlag = true;
|
||||
this.showBluePrint = true;
|
||||
this.selectBarcodeTabFlag = false;
|
||||
},
|
||||
|
||||
//选择下标元素
|
||||
tableSelect: function(selected) {
|
||||
if (selected.length > 0) {
|
||||
this.showResult = false;
|
||||
} else {
|
||||
this.showResult = true;
|
||||
}
|
||||
if (selected.length > 0 && selected.length > this.selectedList.length) {
|
||||
let index = selected[selected.length - 1];
|
||||
let barcode = this.YESTableData[index].FNumber;
|
||||
}
|
||||
|
||||
this.selectedList = selected;
|
||||
},
|
||||
|
||||
//删除
|
||||
del: function(e) {
|
||||
let _self = this;
|
||||
|
||||
uni.vibrateShort({
|
||||
success: function() {}
|
||||
});
|
||||
|
||||
if (this.selectedList.length == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '无删除数据'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除数据吗?',
|
||||
showCancel: true,
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
_self.YESTableData = _self.YESTableData.filter(function(el, index) {
|
||||
return !_self.selectedList.includes(index);
|
||||
});
|
||||
_self.selectedList = new Array();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功'
|
||||
});
|
||||
_self.showResult = true;
|
||||
|
||||
if (_self.YESTableData.length == 0) {
|
||||
uni.setStorageSync(this.dbAlise + this.userName + this.currentTranType + 'lastSaveOrgid', '');
|
||||
}
|
||||
|
||||
this.saveCash();
|
||||
} else if (res.cancel) {
|
||||
console.log('取消')
|
||||
}
|
||||
}
|
||||
});
|
||||
if (_self.YESTableData.length == 0) {
|
||||
_self.mixedDisabled = false;
|
||||
}
|
||||
},
|
||||
|
||||
saveCash: function() {
|
||||
let _self = this;
|
||||
let otherInfo = {
|
||||
currentTranType: this.currentTranType,
|
||||
dbAlise: this.dbAlise,
|
||||
userName: this.userName,
|
||||
FBarCodeNO: this.FBarCodeNO,
|
||||
FQty: this.FQty,
|
||||
currentBarcodeNO: this.currentBarcodeNO
|
||||
};
|
||||
this.pageCashInfo.YESTableData = this.YESTableData;
|
||||
this.pageCashInfo.commitDataList = this.commitDataList;
|
||||
this.pageCashInfo.otherInfo = otherInfo;
|
||||
this.pageCashInfo.barcodeExistList = this.barcodeExistList;
|
||||
this.pageCashInfo.barcodeTableData = this.barcodeTableData;
|
||||
uni.setStorageSync('pageCash' + _self.dbAlise + _self.userName + _self.currentTranType + _self.orgFItemID, this.pageCashInfo);
|
||||
},
|
||||
|
||||
judgeCash: function() {
|
||||
let _self = this;
|
||||
let lastSaveOrgid = uni.getStorageSync(this.dbAlise + this.userName + this.currentTranType + 'lastSaveOrgid');
|
||||
let cashValue;
|
||||
if (!this.isChangedOrg) {
|
||||
cashValue = uni.getStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + lastSaveOrgid);
|
||||
} else {
|
||||
cashValue = uni.getStorageSync('pageCash' + this.dbAlise + this.userName + this.currentTranType + this.orgFItemID);
|
||||
}
|
||||
if (cashValue.commitDataList) {
|
||||
uni.showModal({
|
||||
content: '存在未提交数据是否加载',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
_self.loadByCash();
|
||||
} else if (res.cancel) {
|
||||
console.log('点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
barcodeSelect: function(selected) {
|
||||
this.printList.splice(0, this.printList.length);
|
||||
selected.forEach(function(item) {
|
||||
_self.printList.push(_self.barcodeTableData[item].barcode);
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page-class {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.head-class {
|
||||
padding: 0rpx 32rpx 0rpx 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.head-organzie-class {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.head-row-content-class-organzie {
|
||||
font-size: 32rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #666666;
|
||||
}
|
||||
.head-organzie-img-class {
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.head-row-class {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
.head-row-class image {
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
}
|
||||
.head-row-title-class {
|
||||
width: 170rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.head-checkbox-class {
|
||||
transform: scale(0.75);
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
.head-row-input-class {
|
||||
height: 60rpx;
|
||||
width: 100%;
|
||||
flex-shrink: 1;
|
||||
border-radius: 10rpx;
|
||||
border: 2rpx solid #d8d8d8;
|
||||
margin-left: 24rpx;
|
||||
padding: 0px 4px 0px 4px;
|
||||
font-size: 28rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
}
|
||||
|
||||
.head-row-input-disable-class {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 2rpx solid rgba(216, 216, 216, 1);
|
||||
background-color: #f4f4f4 !important;
|
||||
margin-left: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
}
|
||||
|
||||
.space-separate-class {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
height: 16rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.tab-lists-class {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* height: 80rpx; */
|
||||
/* margin-top: 32rpx; */
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
}
|
||||
|
||||
.tab-line-class {
|
||||
border-left-width: 1.5px;
|
||||
border-left-color: #e5e5e5;
|
||||
border-left-style: solid;
|
||||
height: 40rpx;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tab-unselected-class {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.tab-selected-class {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
color: #4662ff;
|
||||
}
|
||||
|
||||
.tab-selected-class::after {
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
width: 2rem;
|
||||
height: 0.12rem;
|
||||
background: #4662ff;
|
||||
bottom: -0.1rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
/* .del-commit{
|
||||
display: flex;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height:80rpx ;
|
||||
left: 0;
|
||||
bottom: 18rpx;
|
||||
} */
|
||||
|
||||
.type-select-box-del {
|
||||
/* width: 100%;
|
||||
height:80rpx; */
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
left: 0;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
|
||||
.type-select-box-commit {
|
||||
/* width: 100%;
|
||||
height:80rpx; */
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
left: 0;
|
||||
bottom: 0rpx;
|
||||
}
|
||||
|
||||
.alter {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: #333333;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.err {
|
||||
position: fixed;
|
||||
left: 100rpx;
|
||||
right: 100rpx;
|
||||
top: 400rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
opacity: 1;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.errTitle {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
// border-bottom: 2rpx solid #3D3D3D;
|
||||
}
|
||||
|
||||
.errList {
|
||||
width: 100%;
|
||||
margin-left: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.errDetails {
|
||||
width: 90%;
|
||||
font-size: 26rpx;
|
||||
color: #3d3d3d;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cash-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cashConfirm {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: 50%;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
color: #007aff;
|
||||
border-top: 2rpx solid #3d3d3d;
|
||||
border-right: 2rpx solid #3b4144;
|
||||
}
|
||||
|
||||
.cashCancel {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
width: 50%;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
color: #007aff;
|
||||
border-top: 2rpx solid #3d3d3d;
|
||||
}
|
||||
|
||||
.button-class {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
background-color: #4662ff;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user