vue-cli init
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label-width="80" label="条码:">
|
||||
<input type="text" v-model="QRBarCodeData.QRBarCode" :focus="PositionFocus" style="width:300px;"
|
||||
@confirm="QRBarCodeReviewScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:150px;">缸号:{{QRBarCodeData.CrockNo}}</text>
|
||||
<text class="title" style="width:100px;">卷号:{{QRBarCodeData.GoodsBillNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:180px;">编号:{{QRBarCodeData.FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:150px;">重量:{{QRBarCodeData.Qty}} KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:250px;">品名:{{QRBarCodeData.FabricGoodsName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:250px;">颜色:{{QRBarCodeData.GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:250px;">订单号:{{QRBarCodeData.SaleOrderNo}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
GetGoodsQRBarCode,
|
||||
playSuccessAudio,
|
||||
playErrorAudio,
|
||||
guid
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PositionFocus: true,
|
||||
QRBarCodeData: {
|
||||
QRBarCode: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeName: '',
|
||||
SaleOrderNo: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
Qty: ''
|
||||
},
|
||||
BillDataMessage: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
QRBarCodeReviewScan() {
|
||||
var aStrBarCode = GetGoodsQRBarCode(this.QRBarCodeData.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
|
||||
if (aStrBarCode.split("^").length >= 8) {
|
||||
console.log("---->>>" + aStrBarCode.split("^")[0]);
|
||||
this.QRBarCodeData.CrockNo = aStrBarCode.split("^")[0];
|
||||
this.QRBarCodeData.GoodsBillNo = aStrBarCode.split("^")[1];
|
||||
this.QRBarCodeData.FabricGoodsNo = aStrBarCode.split("^")[3];
|
||||
this.QRBarCodeData.FabricGoodsName = aStrBarCode.split("^")[4];
|
||||
this.QRBarCodeData.GoodsCodeName = aStrBarCode.split("^")[5] + '#' + aStrBarCode.split("^")[6];
|
||||
this.QRBarCodeData.SaleOrderNo = aStrBarCode.split("^")[7];
|
||||
this.QRBarCodeData.Qty = aStrBarCode.split("^")[8];
|
||||
|
||||
util.playSuccessAudio();
|
||||
this.QRBarCodeData.QRBarCode = '';
|
||||
this.PositionFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.PositionFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '标签条码检测成功!';
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
} else {
|
||||
util.playErrorAudio();
|
||||
this.QRBarCodeData.QRBarCode = '';
|
||||
this.PositionFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.PositionFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '标签条码检测出错,请确认!';
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.wrap .search {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.apply-text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
|
||||
span {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.user-images {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.apply-list-foot {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.personnel-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.personnel-user {
|
||||
position: relative;
|
||||
margin: 5px 9px 0;
|
||||
}
|
||||
|
||||
.user-images {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-right: 0;
|
||||
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: -5px;
|
||||
color: #FE0100;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<view>
|
||||
<button type="primary" @click="onShowDatePicker('range')">单据日期 {{range[0]}} - {{range[1]}}</button>
|
||||
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchBillNo" :show-action="false" @custom="onTabChange" @search="onTabChange"
|
||||
placeholder="请输入单号或往来单位">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false" :current="activeTabIndex"
|
||||
@change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料"
|
||||
title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" refresher-enabled :refresher-threshold="200"
|
||||
:refresher-triggered="triggered" refresher-background="gray">
|
||||
<view v-for="(item, index) in ItemDataList" :key="index" @click="cardClickFun(item, index)">
|
||||
<DyeWorksDyeBackItem :item="item" :isSelect="isSelect" :index="index"></DyeWorksDyeBackItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<addBtn url="./dyeworksDyebackAdd"></addBtn>
|
||||
|
||||
<mx-date-picker :show="showPicker" :type="BillDatetype" :value="BillDatevalue" :show-tips="true"
|
||||
:begin-text="'开始'" :end-text="'结束'" :show-seconds="false" @confirm="BillDateConfirm"
|
||||
@cancel="BillDateConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import DyeWorksDyeBackItem from '@/components/card/dyeworksDyebackItem.vue';
|
||||
import util from '../../common/util';
|
||||
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
||||
export default {
|
||||
components: {
|
||||
DyeWorksDyeBackItem,
|
||||
MxDatePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [{
|
||||
title: '未审核',
|
||||
status: '0'
|
||||
},
|
||||
{
|
||||
title: '已审核',
|
||||
status: '1'
|
||||
},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
searchBillNo: '',
|
||||
showPicker: false,
|
||||
BillBeginDate: new Date(new Date() - 24 * 60 * 60 * 1000).toLocaleDateString(),
|
||||
BillEndDate: new Date().toLocaleDateString(),
|
||||
range: [new Date(new Date() - 24 * 60 * 60 * 1000).toLocaleDateString(), new Date().toLocaleDateString()],
|
||||
BillDatetype: 'range',
|
||||
BillDatevalue: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.DyeBackBusinessData();
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
this.onTabChange(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function() {
|
||||
console.log("activeTabIndex参数改变,即将刷新..." + this.activeTabIndex);
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
/* uni.$off('deleteCardFun', that.deleteCardFun);
|
||||
uni.$off('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
uni.$off('addBjdItemInListFun', that.addBjdItemInListFun); */
|
||||
},
|
||||
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
if (this.activeTabIndex == 0) {
|
||||
console.log("---->>未审核<<----");
|
||||
this.DyeBackBusinessData();
|
||||
} else {
|
||||
console.log("---->>已审核<<----");
|
||||
this.DyeBackBusinessDataCommit();
|
||||
}
|
||||
},
|
||||
onShowDatePicker(type) { //显示
|
||||
this.BillDatetype = type;
|
||||
this.showPicker = true;
|
||||
this.BillDatevalue = this[type];
|
||||
},
|
||||
|
||||
BillDateConfirm(e) { //选择
|
||||
this.showPicker = false;
|
||||
if (e) {
|
||||
this[this.BillDatetype] = e.value;
|
||||
this.BillBeginDate = e.value[0];
|
||||
this.BillEndDate = e.value[1];
|
||||
}
|
||||
},
|
||||
|
||||
DyeBackBusinessData: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
} else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetDyeWorksDyeBackDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%' + this.searchBillNo + '%'
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
that.ItemDataList = [];
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
DyeBackBusinessDataCommit: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
} else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetDyeWorksDyeBackDataCommitSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: '1'
|
||||
}, {
|
||||
name: 'BeginDate',
|
||||
value: this.BillBeginDate
|
||||
}, {
|
||||
name: 'EndDate',
|
||||
value: this.BillEndDate
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%' + this.searchBillNo + '%'
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
that.ItemDataList = [];
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storegoods/dyeworksDyebackDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 20upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,911 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-form ref="uForm">
|
||||
<view class="flex-white-plr26 ptb10 mt32 bdb_f5">
|
||||
<text class="mr26">进仓凭证</text>
|
||||
<u-input disabled placeholder="自动生成" v-model="DyeBackBillNo" />
|
||||
<text class="mr26">进仓日期</text> {{$u.timeFormat(DyeBackBillDate, 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
||||
<view :class="StoreName ? '' : 'cBlack'"> {{StoreName ? StoreName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="pickerSelectFun('单据类型')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">单据类型<text class="redXingh">*</text></text>
|
||||
<view :class="BillTypeName ? '' : 'cBlack'"> {{BillTypeName ? BillTypeName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-white-plr26 ptb20 bdb_f5" @click="selectCustomer">
|
||||
<text class="mr26">往来单位<text class="redXingh">*</text></text>
|
||||
<view :class="CustomerName ? '' : 'cBlack'"> {{CustomerName ? CustomerName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26" >仓位编号<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="StoreStationNo" :focus="testFocus0" style="width:100px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:150px;">仓位名称:{{StoreStationName}}</text>
|
||||
</view>
|
||||
<view class="flex-white-plr26-column ptb20 mt32">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
<text>备注内容</text>
|
||||
</view>
|
||||
<u-input v-model="Remark" maxlength="-1" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||
</view>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" maxlength="-1" v-model="QRBarCode" :focus="testFocus1" style="width:200px;" @confirm="DyeBackBillDetailScan" />
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">已扫条数:{{CrockNoScanRoll}}条</text>
|
||||
<text class="title" style="width:200px;">已扫重量:{{CrockNoScanQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单总条:{{BillSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">本单总重:{{BillSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"
|
||||
@onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="submitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="submitBtnFun">
|
||||
{{pageType ? '保存' : '提交'}}
|
||||
</u-button>
|
||||
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
<!--组件-->
|
||||
<!-- <u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
selectType: '',
|
||||
pageType: '',
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
testFocus0: true,
|
||||
testFocus1: false,
|
||||
DyeBackBillID: 0,
|
||||
DyeBackBillNo: '',
|
||||
DyeBackBillDate: '',
|
||||
DyeWorksBillNo: '',
|
||||
DyeOrderDetailIDs: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
CustomerID: 0,
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: 0,
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: 0,
|
||||
SaleUserName: '',
|
||||
SaleCustomerAddress: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
BillBusinessID: 0,
|
||||
BillTypeName: '',
|
||||
actionSheetShow: false,
|
||||
BarCodeDelStatus: false,
|
||||
Remark: '',
|
||||
GoodsDetailList:[],
|
||||
StoreNameDataList: [],
|
||||
BillBusinessDataList: [],
|
||||
YarnDataList: [],
|
||||
QRBarCode: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
BarCodeQtys: '',
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
CrockNoScanRoll: 0,
|
||||
CrockNoScanQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '成品条数',
|
||||
key: 'Roll'
|
||||
},{
|
||||
label: '已扫条数',
|
||||
key: 'ScanRoll'
|
||||
}, {
|
||||
label: '已扫重量',
|
||||
key: 'ScanQty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cpList: function(val, old) {
|
||||
that.cpCalcFun();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
this.getStoreNameData();
|
||||
|
||||
setTimeout(() => {
|
||||
this.getBillBusinessData();
|
||||
}, 500);
|
||||
|
||||
if (getApp().globalData.StoreTypeNo.toUpperCase() == 'STOREFABRICGOODS' )
|
||||
{
|
||||
this.StoreNameID = getApp().globalData.StoreNameID;
|
||||
this.StoreName = getApp().globalData.StoreName;
|
||||
};
|
||||
|
||||
uni.$on('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$on('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$on('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$on('shangjiBindFun', that.shangjiBindFun)
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$off('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$off('shangjiBindFun', that.shangjiBindFun)
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
BarCodeDelChange:function () {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
pickerSelectFun: function(str) {
|
||||
console.log("---->>>" + str);
|
||||
that.selectList = [];
|
||||
if (str == '仓库名称') {
|
||||
that.selectList = this.StoreNameDataList;
|
||||
} else if (str == '单据类型') {
|
||||
that.selectList = this.BillBusinessDataList;
|
||||
}
|
||||
|
||||
that.selectShow = true;
|
||||
that.selectType = str;
|
||||
},
|
||||
// 选择框选中事件
|
||||
selectConfirmFun: function(e) {
|
||||
if (that.selectType == '仓库名称') {
|
||||
that.StoreNameID = e[0].value;
|
||||
that.StoreName = e[0].label;
|
||||
} else if (that.selectType == '单据类型') {
|
||||
that.BillBusinessID = e[0].value;
|
||||
that.BillTypeName = e[0].label;
|
||||
}
|
||||
},
|
||||
|
||||
getStoreNameData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: '%StoreFabricGoods%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreNameDataList.push({
|
||||
value: aResultData[i].StoreNameID,
|
||||
label: aResultData[i].StoreName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.StoreNameDataList = [];
|
||||
} else {
|
||||
this.StoreNameDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreStationName',
|
||||
params: [{
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = false;
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
getBillBusinessData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetBillBusinessList',
|
||||
params: [{
|
||||
name: 'TypeStatus',
|
||||
value: '1'
|
||||
}, {
|
||||
name: 'TypeNo',
|
||||
value: 'BusinessTypeDyeFabric'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count == 1) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessID = aResultData[0].BillBusinessID;
|
||||
this.BillTypeName = aResultData[0].BillTypeName;
|
||||
this.BillBusinessDataList.push({
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessDataList.push({
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.BillBusinessDataList = [];
|
||||
} else {
|
||||
this.BillBusinessDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
DyeWorksDyeBackDetail: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetDyeWorksDyeBackDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.DyeBackBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.DyeBackBillNo = aResultData[0].BillNo;
|
||||
this.DyeBackBillDate = aResultData[0].BillDate;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2) + '条';
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2) + 'Kg';
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 日期修改
|
||||
bindDateChange: function(e) {
|
||||
that.bjdDate = e.detail.value;
|
||||
that.bjdDateTime = new Date(e.detail.value + ' 00:00:00').getTime()
|
||||
},
|
||||
// 展示相应数据选择框
|
||||
|
||||
scanFun: function() {
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
that.code = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择所属客户
|
||||
selectCustomer: function() {
|
||||
uni.navigateTo({
|
||||
url: '../basedata/customer/customer?type=染整厂'
|
||||
})
|
||||
},
|
||||
// 绑定客户
|
||||
bjdKehuBindFun: function(e) {
|
||||
console.log("CustomerName===" + e.CustomerName);
|
||||
that.CustomerID = e.CustomerID;
|
||||
that.CustomerName = e.CustomerName;
|
||||
that.PlanDepartmentID = e.PlanDepartmentID;
|
||||
that.PlanDepartmentName = e.PlanDepartmentName;
|
||||
that.SaleUserID = e.SaleUserID;
|
||||
that.SaleUserName = e.SaleUserName;
|
||||
that.SaleCustomerAddress = e.CustomerAddress + ' ' + e.CustomerPhone + ' ' + e.CustomerLinkName;
|
||||
},
|
||||
|
||||
// 提交按钮方法
|
||||
submitBtnFun: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
if (this.BillTypeName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '单据类型不能为空,请先输入单据类型!';
|
||||
return;
|
||||
}
|
||||
if (this.CustomerName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '往来单位不能为空,请先输入往来单位!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓位名称不能为空,请先输入仓位编号!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.OutBillID > 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据已经提交,不能重复提交!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_DyeWorksDyeBackBillMaster',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.DyeBackBillID
|
||||
},
|
||||
{
|
||||
name: '@BillBusinessID',
|
||||
value: this.BillBusinessID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@CustomerID',
|
||||
value: this.CustomerID
|
||||
},
|
||||
{
|
||||
name: '@Remark',
|
||||
value: this.Remark
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.DyeBackBillID = aResultData.DyeBackStoreBillID;
|
||||
this.DyeBackBillNo = aResultData.DyeBackStoreBillNo;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '提交出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '提交出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
DyeBackBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.DyeBackBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
|
||||
let aBarCodeDelStatus=0
|
||||
if (this.BarCodeDelStatus){
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
if (this.QRBarCode.indexOf(';') > 0)
|
||||
{
|
||||
var aBarCodeList = this.QRBarCode.split(';');
|
||||
console.log("DyeWorksBillNo=>>>===>>" +aBarCodeList[0]);
|
||||
|
||||
if (aBarCodeList[0].indexOf('^') > 0){
|
||||
|
||||
|
||||
var aBarCodeList = this.QRBarCode.split('^');
|
||||
|
||||
this.DyeWorksBillNo = aBarCodeList[0];
|
||||
this.DyeOrderDetailIDs = aBarCodeList[1]+'^'+aBarCodeList[2]+'^'
|
||||
+aBarCodeList[4]+'^'+aBarCodeList[5]+'^'+aBarCodeList[6]+'^'
|
||||
+aBarCodeList[7]+'^';
|
||||
this.CrockNo = aBarCodeList[3];
|
||||
this.BarCodeQtys = aBarCodeList[8];
|
||||
console.log("DyeWorksBillNo====" +this.DyeWorksBillNo);
|
||||
console.log("CrockNo===="+ this.CrockNo);
|
||||
console.log("DyeOrderDetailID====" +this.DyeOrderDetailID);
|
||||
console.log("this.BarCodeQtys ---->>" + this.BarCodeQtys);
|
||||
}else{
|
||||
this.DyeWorksBillNo = aBarCodeList[0];
|
||||
this.DyeOrderDetailIDs = aBarCodeList[1];
|
||||
this.CrockNo = aBarCodeList[2];
|
||||
this.BarCodeQtys = aBarCodeList[4];
|
||||
}
|
||||
console.log("DyeWorksBillNo====" +this.DyeWorksBillNo);
|
||||
console.log("CrockNo===="+ this.CrockNo);
|
||||
console.log("DyeOrderDetailID====" +this.DyeOrderDetailID);
|
||||
console.log("this.BarCodeQtys ---->>" + this.BarCodeQtys);
|
||||
}else{
|
||||
this.DyeWorksBillNo = "";
|
||||
this.DyeOrderDetailIDs = "";
|
||||
this.CrockNo = "";
|
||||
this.BarCodeQtys = this.QRBarCode;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_DyeWorksDyeBackBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.DyeBackBillID
|
||||
},
|
||||
{
|
||||
name: '@DyeOrderDetailIDs',
|
||||
value: this.DyeOrderDetailIDs
|
||||
},
|
||||
{
|
||||
name: '@DyeWorksBillNo',
|
||||
value: this.DyeWorksBillNo
|
||||
},
|
||||
{
|
||||
name: '@CrockNo',
|
||||
value: this.CrockNo
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@BarCodeQtys',
|
||||
value: this.BarCodeQtys
|
||||
},
|
||||
{
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.CrockNoScanRoll = parseFloat(aResultData.CrockNoScanRoll);
|
||||
this.CrockNoScanQty = parseFloat(aResultData.CrockNoScanQty);
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.DyeWorksDyeBackDetail();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.DyeBackBillID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.DyeBackBillID
|
||||
},{
|
||||
name: '@BillNo',
|
||||
value: this.DyeBackBillNo
|
||||
},{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,582 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单号:{{BillNo}}</text>
|
||||
<text class="title" style="width:200px;">日期:{{BillDate}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">往来单位:{{CustomerName}}</text>
|
||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
|
||||
<text class="title" style="width:80px;">仓位编号:</text>
|
||||
<input type="text" v-model="StoreStationNo" style="width:120px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:150px;">仓位名称:{{StoreStationName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" maxlength="-1" :focus="testFocus1" style="width:200px;"
|
||||
@confirm="DyeBackBillDetailScan" />
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">已扫条数:{{CrockNoScanRoll}}条</text>
|
||||
<text class="title" style="width:200px;">已扫重量:{{CrockNoScanQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单总条:{{BillSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">本单总重:{{BillSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<!-- <u-action-sheet :list="InDetailList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
let that = '';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
BillMasterID: 0,
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
BarCodeQtys: '',
|
||||
BillNo: '',
|
||||
BillDate: '',
|
||||
DyeWorksBillNo: '',
|
||||
DyeOrderDetailIDs: '',
|
||||
CustomerName: '',
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
testFocus0: true,
|
||||
testFocus1: false,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
CrockNoScanRoll: 0,
|
||||
CrockNoScanQty: 0,
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '成品条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '已扫条数',
|
||||
key: 'ScanRoll'
|
||||
}, {
|
||||
label: '已扫重量',
|
||||
key: 'ScanQty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.BillMasterID = e.billid;
|
||||
}
|
||||
this.DyeWorksDyeBackDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
BarCodeDelChange: function() {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreStationName',
|
||||
params: [{
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
//this.testFocus1 = false;
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
DyeBackBillDetailScan() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
|
||||
let aBarCodeDelStatus = 0
|
||||
if (this.BarCodeDelStatus) {
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
if (this.QRBarCode.indexOf(';') > 0) {
|
||||
var aBarCodeList = this.QRBarCode.split(';');
|
||||
if (aBarCodeList[0].indexOf('^') > 0) {
|
||||
var aBarCodeList = this.QRBarCode.split('^');
|
||||
this.DyeWorksBillNo = aBarCodeList[0];
|
||||
this.DyeOrderDetailIDs = aBarCodeList[1] + '^' + aBarCodeList[2] + '^' +
|
||||
aBarCodeList[4] + '^' + aBarCodeList[5] + '^' + aBarCodeList[6] + '^' +
|
||||
aBarCodeList[7] + '^';
|
||||
this.CrockNo = aBarCodeList[3];
|
||||
this.BarCodeQtys = aBarCodeList[8];
|
||||
} else {
|
||||
this.DyeWorksBillNo = aBarCodeList[0];
|
||||
this.DyeOrderDetailIDs = aBarCodeList[1];
|
||||
this.CrockNo = aBarCodeList[2];
|
||||
this.BarCodeQtys = aBarCodeList[4];
|
||||
|
||||
}
|
||||
} else {
|
||||
this.DyeWorksBillNo = "";
|
||||
this.DyeOrderDetailIDs = "";
|
||||
this.CrockNo = "";
|
||||
this.BarCodeQtys = this.QRBarCode;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_DyeWorksDyeBackBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.BillMasterID
|
||||
},
|
||||
{
|
||||
name: '@DyeOrderDetailIDs',
|
||||
value: this.DyeOrderDetailIDs
|
||||
},
|
||||
{
|
||||
name: '@DyeWorksBillNo',
|
||||
value: this.DyeWorksBillNo
|
||||
},
|
||||
{
|
||||
name: '@CrockNo',
|
||||
value: this.CrockNo
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@BarCodeQtys',
|
||||
value: this.BarCodeQtys
|
||||
},
|
||||
{
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.CrockNoScanRoll = parseFloat(aResultData.CrockNoScanRoll);
|
||||
this.CrockNoScanQty = parseFloat(aResultData.CrockNoScanQty);
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.DyeWorksDyeBackDetail();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
//this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
DyeWorksDyeBackDetail: function() {
|
||||
if (this.BillMasterID == 0) {
|
||||
this.BillMasterID = 30685
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetDyeWorksDyeBackDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.BillMasterID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.BillNo = aResultData[0].BillNo;
|
||||
this.BillDate = aResultData[0].BillDate;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.StoreNameID = aResultData[0].StoreNameID;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2) + '条';
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2) + 'Kg';
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核或消审!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.BillMasterID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.BillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<view>
|
||||
<button type="primary" @click="onShowDatePicker('range')">单据日期 {{range[0]}} 至 {{range[1]}}</button>
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchBillNo" :show-action="false" @custom="onTabChange" @search="onTabChange"
|
||||
placeholder="请输入单号或往来单位">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false" :current="activeTabIndex"
|
||||
@change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
<!-- <scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||
<view v-for="(item, index) in ItemDataList" :key="index" @click="cardClickFun(item, index)">
|
||||
<GoodsBusinessCheckItem :item="item" :isSelect="isSelect" :index="index"></GoodsBusinessCheckItem>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||
@refresherrefresh="onRefresh" @refresherrestore="onRestore">
|
||||
<view v-for="(item, index) in list" :key="index" @click="cardClickFun(item, index)">
|
||||
<GoodsBusinessCheckView :item="item" :isSelect="isSelect" :index="index"></GoodsBusinessCheckView>
|
||||
</view>
|
||||
<getMore :isMore="isMore"></getMore>
|
||||
</scroll-view>
|
||||
|
||||
<addBtn url="./storeGoodsBusinessCheckAdd"></addBtn>
|
||||
<mx-date-picker :show="showPicker" :type="BillDatetype" :value="BillDatevalue" :show-tips="true"
|
||||
:begin-text="'开始'" :end-text="'结束'" :show-seconds="false" @confirm="BillDateConfirm"
|
||||
@cancel="BillDateConfirm" />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import GoodsBusinessCheckView from '@/pages/storegoods/storeGoodsBusinessCheckView.vue';
|
||||
import util from '../../common/util';
|
||||
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
||||
export default {
|
||||
components: {
|
||||
GoodsBusinessCheckView,
|
||||
MxDatePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTabIndex: 0,
|
||||
list: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
searchBillNo: '',
|
||||
showPicker: false,
|
||||
BillBeginDate: this.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
|
||||
BillEndDate: this.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
|
||||
range: [this.$u.timeFormat(new Date(), 'yyyy-mm-dd'), this.$u.timeFormat(new Date(), 'yyyy-mm-dd')],
|
||||
BillDatetype: 'range',
|
||||
BillDatevalue: '',
|
||||
tabList: [{
|
||||
title: '未审核',
|
||||
status: '0'
|
||||
}, {
|
||||
title: '已审核',
|
||||
status: '1'
|
||||
}, ],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
this.selectDataFun();
|
||||
//uni.$on('deleteCardFun', that.deleteCardFun);
|
||||
//uni.$on('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
//uni.$on('addBjdItemInListFun', that.addBjdItemInListFun)
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
//console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
that.selectDataFun(newVal);
|
||||
//this.doRefresh(this.tbOrderCouponList)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function() {
|
||||
|
||||
},
|
||||
onBackPress() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
},
|
||||
|
||||
onShowDatePicker(type) { //显示
|
||||
this.BillDatetype = type;
|
||||
this.showPicker = true;
|
||||
this.BillDatevalue = this[type];
|
||||
},
|
||||
|
||||
BillDateConfirm(e) { //选择
|
||||
this.showPicker = false;
|
||||
if (e) {
|
||||
//this[this.BillDatetype] = e.value;
|
||||
this.BillBeginDate = this.$u.timeFormat(Date.parse(e.value[0]),'yyyy-mm-dd');
|
||||
this.BillEndDate = this.$u.timeFormat(Date.parse(e.value[1]),'yyyy-mm-dd');
|
||||
this.range = [this.BillBeginDate, this.BillEndDate];
|
||||
this.selectDataFun();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 加载更多数据中
|
||||
* @param infiniteScroll
|
||||
*/
|
||||
doInfinite(infiniteScroll) {
|
||||
const _self = this;
|
||||
new TbOrderCouponService().findTableTbOrderCouponList({
|
||||
pagination: _self.pagination,
|
||||
data: {
|
||||
communityId: _self.globalVariable.userInfo.tbCommunity.id,
|
||||
userId: _self.globalVariable.userInfo.id,
|
||||
status: _self.tabList[_self.activeTabIndex].status,
|
||||
orderBy: 'create_time desc',
|
||||
},
|
||||
}).then(result => {
|
||||
_self.pagination.refreshPage(result);
|
||||
_self.tbOrderCouponList = [..._self.tbOrderCouponList, ...result.list];
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
selectDataFun: function() {
|
||||
if (that.activeTabIndex == 0)
|
||||
{
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/getProductCheckOrderList',
|
||||
data: {
|
||||
'audit_status': '1',
|
||||
method: 'GET',
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
that.list = [];
|
||||
let data = res.data.data.list;
|
||||
//console.log("--->" + JSON.stringify(res.data.data));
|
||||
if (res.data.data.total != 0){
|
||||
if (that.pageIndex == 1) {
|
||||
that.list = [];
|
||||
}
|
||||
if (res.data == 10) {
|
||||
that.pageIndex += 1;
|
||||
that.isMore = true;
|
||||
} else {
|
||||
that.isMore = false;
|
||||
}
|
||||
that.list = that.list.concat(data);
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
else if (that.activeTabIndex == 1){
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/getProductCheckOrderList',
|
||||
data: {
|
||||
'audit_status': '2',
|
||||
'start_check_time': this.BillBeginDate ,
|
||||
'end_check_time': this.BillEndDate,
|
||||
method: 'GET',
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data.data));
|
||||
this.triggered = false;
|
||||
that.list = [];
|
||||
let data = res.data.data.list;
|
||||
|
||||
if (res.data.data.total != 0){
|
||||
if (that.pageIndex == 1) {
|
||||
that.list = [];
|
||||
}
|
||||
if (res.data == 10) {
|
||||
that.pageIndex += 1;
|
||||
that.isMore = true;
|
||||
} else {
|
||||
that.isMore = false;
|
||||
}
|
||||
that.list = that.list.concat(data);
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storegoods/storeGoodsBusinessCheckDetail?billid=' + item.id
|
||||
})
|
||||
},
|
||||
|
||||
// 搜索框回调方法
|
||||
searchBoxEmitFun: function(e) {
|
||||
that.searchValue = e.searchValue1;
|
||||
that.cxGetDataFun()
|
||||
},
|
||||
// 下拉刷新
|
||||
onRefresh: function() {
|
||||
if (that.triggered) return
|
||||
that.triggered = true;
|
||||
that.cxGetDataFun();
|
||||
},
|
||||
onRestore: function(e) {
|
||||
that.triggered = false; // 需要重置
|
||||
},
|
||||
// 重新获取数据
|
||||
cxGetDataFun: function() {
|
||||
that.pageIndex = 1;
|
||||
that.isMore = true;
|
||||
that.selectDataFun();
|
||||
},
|
||||
deleteCardFun: function(e) {
|
||||
let arr = that.list;
|
||||
arr.splice(e.index, 1);
|
||||
that.list = arr;
|
||||
},
|
||||
// add页面新增数据
|
||||
addBjdItemInListFun: function(e) {
|
||||
that.cxGetDataFun()
|
||||
},
|
||||
// 通过下标更新list数据
|
||||
updateBjdListByIndex: function(e) {
|
||||
that.$set(that.list, parseInt(e.index), e.obj)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 20upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,796 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-form ref="uForm">
|
||||
<view class="flex-white-plr26 ptb10 mt32 bdb_f5">
|
||||
<text class="mr26">盘点凭证</text>
|
||||
<u-input disabled placeholder="自动生成" v-model="GoodsCheckBillNo" />
|
||||
<text class="mr26">盘点日期</text> {{$u.timeFormat(GoodsCheckBillDate, 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
||||
<view :class="StoreName ? '' : 'cBlack'"> {{StoreName ? StoreName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view @click="pickerSelectFun('单据类型')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">单据类型<text class="redXingh">*</text></text>
|
||||
<view :class="BillTypeName ? '' : 'cBlack'"> {{BillTypeName ? BillTypeName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26" >仓位编号<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="StoreStationNo" style="width:80px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:120px;">仓位名称:{{StoreStationName}}</text>
|
||||
</view>
|
||||
<view class="flex-white-plr26-column ptb20 m2t32">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
<text>备注内容</text>
|
||||
</view>
|
||||
<u-input v-model="Remark" maxlength="-1" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||
</view>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" maxlength="-1" v-model="QRBarCode" style="width:200px;" @confirm="GoodsCheckBillDetailScan" />
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本架盘前:{{BillSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本架实盘:{{BillSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色盘前:{{GoodsCodeNoSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色实盘:{{GoodsCodeNoSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{CrockNoSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{CrockNoSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"
|
||||
@onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="submitBtnFun">
|
||||
{{pageType ? '保存' : '提交'}}
|
||||
</u-button>
|
||||
|
||||
<!-- <u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button> -->
|
||||
</view>
|
||||
<!--组件-->
|
||||
<!-- <u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import scanMixin from '@/common/scanMixin.js';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
mixins: [scanMixin],
|
||||
data() {
|
||||
return {
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
selectType: '',
|
||||
pageType: '',
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
GoodsCheckBillID: 0,
|
||||
GoodsCheckBillNo: '',
|
||||
GoodsCheckBillDate: '',
|
||||
GoodsCheckBillMasterNo: '',
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
StoreStationID: 0,
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
CustomerID: 0,
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: 0,
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: 0,
|
||||
SaleUserName: '',
|
||||
SaleCustomerAddress: '',
|
||||
BillBusinessID: 0,
|
||||
BillTypeName: '',
|
||||
actionSheetShow: false,
|
||||
Remark: '',
|
||||
GoodsDetailList: [],
|
||||
StoreNameDataList: [],
|
||||
BillBusinessDataList: [],
|
||||
QRBarCode: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
BillSumOldRoll: 0,
|
||||
BillSumNewRoll: 0,
|
||||
GoodsCodeNoSumOldRoll: 0,
|
||||
GoodsCodeNoSumNewRoll: 0,
|
||||
CrockNoSumOldRoll: 0,
|
||||
CrockNoSumNewRoll: 0,
|
||||
BarCodeDelStatus: false,
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: "成品编号",
|
||||
key: "product_code"
|
||||
}, {
|
||||
label: "成品名称",
|
||||
key: "product_name"
|
||||
}, {
|
||||
label: "成品色号",
|
||||
key: "product_color_code"
|
||||
}, {
|
||||
label: "成品颜色",
|
||||
key: "product_color_name"
|
||||
}, {
|
||||
label: "成品缸号",
|
||||
key: "dyelot_number"
|
||||
}, {
|
||||
label: "盘前条数",
|
||||
key: "roll"
|
||||
}, {
|
||||
label: "实盘条数",
|
||||
key: "check_roll"
|
||||
}, {
|
||||
label: "盈亏条数",
|
||||
key: "different_roll"
|
||||
}],
|
||||
// 移除了 scanReceiver 和 isPageActive,因为它们现在由 scanMixin 提供
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cpList: function(val, old) {
|
||||
that.cpCalcFun();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
this.getStoreNameData();
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
/* uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$off('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$off('shangjiBindFun', that.shangjiBindFun) */
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
// #ifdef APP-PLUS
|
||||
this.isPageActive = false;
|
||||
this.unregisterScanBroadcast();
|
||||
// #endif
|
||||
},
|
||||
|
||||
onHide() {
|
||||
// 页面隐藏时
|
||||
this.isPageActive = false;
|
||||
// #ifdef APP-PLUS
|
||||
this.unregisterScanBroadcast();
|
||||
// #endif
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 页面显示时
|
||||
this.isPageActive = true;
|
||||
// #ifdef APP-PLUS
|
||||
this.registerScanBroadcast((scanResult) => {
|
||||
console.log("扫码结果:", scanResult);
|
||||
|
||||
// 处理扫描结果,按照原有逻辑
|
||||
if(!this.StoreName){
|
||||
this.showError('请先选择仓库');
|
||||
return;
|
||||
}
|
||||
if(!this.StoreStationNo){
|
||||
console.log("请先扫描仓库编号!", scanResult);
|
||||
this.StoreStationNo = scanResult;
|
||||
this.$nextTick(() => {
|
||||
this.GetStoreStationName();
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(!this.GoodsCheckBillID){
|
||||
this.showError('请先提交');
|
||||
return;
|
||||
}
|
||||
if(!this.QRBarCode){
|
||||
console.log("请先扫描资料!", scanResult);
|
||||
this.QRBarCode = scanResult;
|
||||
this.$nextTick(() => {
|
||||
this.GoodsCheckBillDetailScan();
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 添加通用错误提示方法
|
||||
showError(message) {
|
||||
this.playError();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: message,
|
||||
showCancel: false
|
||||
});
|
||||
},
|
||||
|
||||
// 添加成功提示方法
|
||||
showSuccess(message) {
|
||||
this.playSuccess();
|
||||
uni.showToast({
|
||||
title: message,
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
BarCodeDelChange: function() {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
|
||||
// 展示相应数据选择框
|
||||
pickerSelectFun: function(str) {
|
||||
console.log("---->>>" + str);
|
||||
that.selectList = [];
|
||||
if (str == '仓库名称') {
|
||||
that.selectList = this.StoreNameDataList;
|
||||
} else if (str == '单据类型') {
|
||||
that.selectList = this.BillBusinessDataList;
|
||||
}
|
||||
that.selectShow = true;
|
||||
that.selectType = str;
|
||||
},
|
||||
// 选择框选中事件
|
||||
selectConfirmFun: function(e) {
|
||||
if (that.selectType == '仓库名称') {
|
||||
that.StoreNameID = e[0].value;
|
||||
that.StoreName = e[0].label;
|
||||
|
||||
} else if (that.selectType == '单据类型') {
|
||||
that.BillBusinessID = e[0].value;
|
||||
that.BillTypeName = e[0].label;
|
||||
}
|
||||
|
||||
console.log("--->>" + that.StoreNameID);
|
||||
},
|
||||
|
||||
|
||||
getStoreNameData() {
|
||||
util.request({
|
||||
url: '/warehouse/physicalWarehouse/getPhysicalWarehouseDropdownList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'warehouse_type_id': 103,
|
||||
},
|
||||
success: (res) => {
|
||||
//console.log("-->>--" + JSON.stringify(res.data));
|
||||
if (res.data.msg == 'success'){
|
||||
var aResultData = res.data.data.list;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
//console.log("--->>>" + aResultData[i].name);
|
||||
this.StoreNameDataList.push({
|
||||
value: aResultData[i].id,
|
||||
label: aResultData[i].name
|
||||
})
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.StoreNameDataList = []
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
console.log("<<<>>>>>" + this.StoreStationNo + '<<<<>>>>');
|
||||
util.request({
|
||||
url: '/warehouse/warehouseBin/getWarehouseBin',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'qr_code': this.StoreStationNo,
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.msg == 'success'){
|
||||
if(this.StoreNameID !== res.data.data.physical_warehouse_id){
|
||||
this.showError('该仓位不属于当前仓库')
|
||||
return
|
||||
}
|
||||
console.log("<<<>>>>>" + JSON.stringify(res.data.data))
|
||||
this.StoreStationID = res.data.data.id;
|
||||
this.StoreStationNo = res.data.data.code;
|
||||
this.StoreStationName = res.data.data.name;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetDetailCrockNoListData() {
|
||||
console.log("00000");
|
||||
},
|
||||
|
||||
getBillBusinessData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetBillBusinessList',
|
||||
params: [{
|
||||
name: 'TypeStatus',
|
||||
value: '3'
|
||||
}, {
|
||||
name: 'TypeNo',
|
||||
value: 'BusinessTypeStoreGoods'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count == 1) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessID = aResultData[i].BillBusinessID;
|
||||
this.BillTypeName = aResultData[i].BillTypeName;
|
||||
this.BillBusinessDataList.push({
|
||||
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
}
|
||||
else if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessDataList.push({
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.BillBusinessDataList = [];
|
||||
} else {
|
||||
this.BillBusinessDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsCheckBillDetailData: function() {
|
||||
console.log("--aaa->>" + this.GoodsCheckBillID);
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/getProductCheckOrder',
|
||||
data: {
|
||||
'id': this.GoodsCheckBillID,
|
||||
method: 'GET',
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data));
|
||||
this.GoodsDetailList = [];
|
||||
this.GoodsCheckBillNo = res.data.data.order_no;
|
||||
/* this.BillSumOldRoll = res.data.data.item_data.roll;
|
||||
this.BillSumNewRoll = res.data.data.item_data.check_roll; */
|
||||
var aResultData = res.data.data.item_data;
|
||||
this.BillSumOldRoll = 0;
|
||||
this.BillSumNewRoll = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
aResultData[i].roll = aResultData[i].roll / 100;
|
||||
aResultData[i].check_roll = aResultData[i].check_roll / 100;
|
||||
aResultData[i].different_roll = aResultData[i].different_roll / 100;
|
||||
|
||||
this.BillSumOldRoll = this.BillSumOldRoll + aResultData[i].roll;
|
||||
this.BillSumNewRoll = this.BillSumNewRoll + aResultData[i].check_roll;
|
||||
};
|
||||
|
||||
this.GoodsDetailList = aResultData;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 日期修改
|
||||
bindDateChange: function(e) {
|
||||
that.bjdDate = e.detail.value;
|
||||
that.bjdDateTime = new Date(e.detail.value + ' 00:00:00').getTime()
|
||||
},
|
||||
// 展示相应数据选择框
|
||||
|
||||
|
||||
scanFun: function() {
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
that.code = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择所属客户
|
||||
selectCustomer: function() {
|
||||
uni.navigateTo({
|
||||
url: '../basedata/customer/customer?type=染整厂'
|
||||
})
|
||||
},
|
||||
// 绑定客户
|
||||
bjdKehuBindFun: function(e) {
|
||||
console.log("CustomerName===" + e.CustomerName);
|
||||
that.CustomerID = e.CustomerID;
|
||||
that.CustomerName = e.CustomerName;
|
||||
that.PlanDepartmentID = e.PlanDepartmentID;
|
||||
that.PlanDepartmentName = e.PlanDepartmentName;
|
||||
that.SaleUserID = e.SaleUserID;
|
||||
that.SaleUserName = e.SaleUserName;
|
||||
that.SaleCustomerAddress = e.CustomerAddress + ' ' + e.CustomerPhone + ' ' + e.CustomerLinkName;
|
||||
|
||||
/*
|
||||
that.clientId = e.clientId;
|
||||
that.clientName = e.clientName;
|
||||
*/
|
||||
},
|
||||
|
||||
// 提交按钮方法
|
||||
submitBtnFun: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.showError('仓库名称不能为空,请先输入仓库名称!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
this.showError('仓位名称不能为空,请先输入仓位编号!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.GoodsCheckBillID > 0) {
|
||||
this.showError('当前单据已经提交,不能重复提交!');
|
||||
return;
|
||||
}
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/addProductCheckOrder',
|
||||
method: 'POST',
|
||||
data: {
|
||||
"check_time": this.GoodsCheckBillDate,
|
||||
"remark": this.Remark,
|
||||
"warehouse_bin_id": this.StoreStationID,
|
||||
"warehouse_id": this.StoreNameID
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.code == '0') {
|
||||
console.log("-->>--" + JSON.stringify(res.data.data));
|
||||
this.GoodsCheckBillID = res.data.data.id;
|
||||
console.log("---GoodsCheckBillID>>" + this.GoodsCheckBillID);
|
||||
if (this.GoodsCheckBillID > 0){
|
||||
this.GoodsCheckBillDetailData();
|
||||
}
|
||||
}else{
|
||||
this.showError(res.data.msg || '提交失败');
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsCheckBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsCheckBillNo == '') {
|
||||
this.QRBarCode = '';
|
||||
this.showError('请先新增单据');
|
||||
return;
|
||||
}
|
||||
console.log("this.QRBarCode ---->>" + this.QRBarCode);
|
||||
|
||||
var aQRBarCode = '';
|
||||
var aBarCode = '';
|
||||
console.log('QRBarCode',this.QRBarCode.startsWith('66^')>0)
|
||||
if (this.QRBarCode.startsWith('66^')>0 || this.QRBarCode.startsWith('99^')>0 || /[\u4E00-\u9FA5]/.test(this.QRBarCode)){
|
||||
aQRBarCode = this.QRBarCode
|
||||
}else {
|
||||
aBarCode = this.QRBarCode;
|
||||
}
|
||||
|
||||
if (aQRBarCode == '' && aBarCode == ''){
|
||||
this.QRBarCode = '';
|
||||
this.aBarCode = ''
|
||||
this.showError('请扫描二维码或者条形码');
|
||||
return;
|
||||
}
|
||||
|
||||
let aBarCodeDelStatus = 1
|
||||
if (this.BarCodeDelStatus) {
|
||||
aBarCodeDelStatus = 3;
|
||||
};
|
||||
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/updateProductCheckOrder',
|
||||
method: 'put',
|
||||
data: {
|
||||
'arrange_type': aBarCodeDelStatus,
|
||||
'id': parseInt(this.GoodsCheckBillID),
|
||||
'bar_code': aBarCode,
|
||||
'qr_code': aQRBarCode,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data));
|
||||
if (res.data.code == '0'){
|
||||
let aResultData = res.data.data;
|
||||
this.FabricGoodsNo = aResultData.product_code;
|
||||
this.FabricGoodsName = aResultData.product_name;
|
||||
this.GoodsCodeNo = aResultData.product_color_code;
|
||||
this.GoodsCodeName = aResultData.product_color_name;
|
||||
this.CrockNo = aResultData.dyelot_number;
|
||||
this.GoodsBillNo = aResultData.volume_number;
|
||||
this.GoodsQty = aResultData.weight / 10000;
|
||||
this.BillSumOldRoll = aResultData.warehouse_bin_check_before_roll/100;
|
||||
this.BillSumNewRoll = aResultData.warehouse_bin_check_roll/100;
|
||||
this.GoodsCodeNoSumOldRoll = aResultData.color_check_before_roll/100;
|
||||
this.GoodsCodeNoSumNewRoll = aResultData.color_check_roll/100;
|
||||
this.CrockNoSumOldRoll = aResultData.dye_check_before_roll/100;
|
||||
this.CrockNoSumNewRoll = aResultData.dye_check_roll/100;
|
||||
|
||||
this.GoodsCheckBillDetailData();
|
||||
this.showSuccess(res.data.msg);
|
||||
this.QRBarCode = '';
|
||||
|
||||
}
|
||||
else {
|
||||
this.showError(res.data.msg);
|
||||
this.QRBarCode = '';
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.showError('当前单据未提交,不能审核或消审!');
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.showError('当前'+ aCommitRecallName +'操作配置有误,不能审核!');
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.GoodsCheckBillID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.GoodsCheckBillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.code == 0 && aResultData.msg ==
|
||||
'success') {
|
||||
this.showSuccess(aCommitRecallName + "成功!");
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.showError(aCommitRecallName + '出错,' + res.data.msg);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,471 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单号:{{GoodsCheckBillNo}}</text>
|
||||
<text class="title" style="width:200px;">日期:{{GoodsCheckBillDate}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
||||
<text class="title" style="width:200px;">仓位名称:{{StoreStationName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" maxlength="-1" style="width:200px;"
|
||||
@confirm="GoodsCheckBillDetailScan" />
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本架盘前:{{BillSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本架实盘:{{BillSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色盘前:{{GoodsCodeNoSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色实盘:{{GoodsCodeNoSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{CrockNoSumOldRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{CrockNoSumNewRoll}}条</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<!-- <u-action-sheet :list="InDetailList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn" :ripple="true" ripple-bg-color="#909399"
|
||||
@click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import scanMixin from '@/common/scanMixin.js';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
//let that = '';
|
||||
export default {
|
||||
mixins: [scanMixin],
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
GoodsCheckBillID: 0,
|
||||
GoodsCheckBillNo: '',
|
||||
GoodsCheckBillDate: '',
|
||||
GoodsCheckBillMasterNo: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
StoreStationID: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
CustomerName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
StoreStationNameFocus: false,
|
||||
BillSumOldRoll: 0,
|
||||
BillSumNewRoll: 0,
|
||||
GoodsCodeNoSumOldRoll: 0,
|
||||
GoodsCodeNoSumNewRoll: 0,
|
||||
CrockNoSumOldRoll: 0,
|
||||
CrockNoSumNewRoll: 0,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'product_code'
|
||||
}, {
|
||||
label: '成品名称',
|
||||
key: 'product_name'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'product_color_code'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'product_color_name'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'dyelot_number'
|
||||
}, {
|
||||
label: '盘前条数',
|
||||
key: 'roll'
|
||||
}, {
|
||||
label: '实盘条数',
|
||||
key: 'check_roll'
|
||||
}, {
|
||||
label: '盈亏条数',
|
||||
key: 'different_roll'
|
||||
}],
|
||||
// 移除了 scanReceiver 和 isPageActive,因为它们现在由 scanMixin 提供
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
//that = this;
|
||||
if (e.billid) {
|
||||
this.GoodsCheckBillID = e.billid;
|
||||
this.GoodsCheckBillDetailData();
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用 mixin 中的 onShow 方法
|
||||
if (this.$options.mixins && this.$options.mixins[0] && this.$options.mixins[0].onShow) {
|
||||
this.$options.mixins[0].onShow.call(this);
|
||||
}
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
this.registerScanBroadcast((scanResult) => {
|
||||
console.log("扫码结果:", scanResult);
|
||||
|
||||
// 处理扫描结果,按照原有逻辑
|
||||
if(!this.QRBarCode){
|
||||
console.log("请先扫描资料!", scanResult);
|
||||
this.QRBarCode = scanResult;
|
||||
this.$nextTick(() => {
|
||||
this.GoodsCheckBillDetailScan();
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
// 添加通用错误提示方法
|
||||
showError(message) {
|
||||
this.playError();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: message,
|
||||
showCancel: false
|
||||
});
|
||||
},
|
||||
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
BarCodeDelChange: function() {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
GoodsCheckBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsCheckBillNo == '') {
|
||||
this.QRBarCode = '';
|
||||
this.showError('请先新增单据');
|
||||
return;
|
||||
}
|
||||
|
||||
// 数据清理:去除空格、换行符等
|
||||
let cleanCode = this.QRBarCode.replace(/\s+/g, '').replace(/[\r\n]/g, '');
|
||||
|
||||
console.log("this.QRBarCode ---->>" + cleanCode);
|
||||
|
||||
var aQRBarCode = '';
|
||||
var aBarCode = '';
|
||||
if (cleanCode.startsWith('66^')>0 || cleanCode.startsWith('99^')>0 || /[\u4E00-\u9FA5]/.test(cleanCode)){
|
||||
aQRBarCode = cleanCode
|
||||
}else {
|
||||
aBarCode = cleanCode;
|
||||
}
|
||||
|
||||
if (aQRBarCode == '' && aBarCode == ''){
|
||||
this.QRBarCode = '';
|
||||
this.aBarCode = ''
|
||||
this.showError('请扫描二维码或者条码');
|
||||
return;
|
||||
}
|
||||
|
||||
let aBarCodeDelStatus = 1
|
||||
if (this.BarCodeDelStatus) {
|
||||
aBarCodeDelStatus = 3;
|
||||
};
|
||||
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/updateProductCheckOrder',
|
||||
method: 'put',
|
||||
data: {
|
||||
'arrange_type': aBarCodeDelStatus,
|
||||
'id': parseInt(this.GoodsCheckBillID),
|
||||
'bar_code': aBarCode,
|
||||
'qr_code': aQRBarCode,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data));
|
||||
if (res.data.code == '0'){
|
||||
let aResultData = res.data.data;
|
||||
this.FabricGoodsNo = aResultData.product_code;
|
||||
this.FabricGoodsName = aResultData.product_name;
|
||||
this.GoodsCodeNo = aResultData.product_color_code;
|
||||
this.GoodsCodeName = aResultData.product_color_name;
|
||||
this.CrockNo = aResultData.dyelot_number;
|
||||
this.GoodsBillNo = aResultData.volume_number;
|
||||
this.GoodsQty = aResultData.weight / 10000;
|
||||
this.BillSumOldRoll = aResultData.warehouse_bin_check_before_roll/100;
|
||||
this.BillSumNewRoll = aResultData.warehouse_bin_check_roll/100;
|
||||
this.GoodsCodeNoSumOldRoll = aResultData.color_check_before_roll/100;
|
||||
this.GoodsCodeNoSumNewRoll = aResultData.color_check_roll/100;
|
||||
this.CrockNoSumOldRoll = aResultData.dye_check_before_roll/100;
|
||||
this.CrockNoSumNewRoll = aResultData.dye_check_roll/100;
|
||||
|
||||
this.playSuccess();
|
||||
this.GoodsCheckBillDetailData();
|
||||
this.BillDataMessage = res.data.msg;
|
||||
this.QRBarCode = '';
|
||||
}
|
||||
else {
|
||||
this.showError(res.data.msg);
|
||||
this.QRBarCode = '';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
||||
console.log('error',error)
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsCheckBillDetailData: function() {
|
||||
console.log("--aaa->>" + this.GoodsCheckBillID);
|
||||
console.log("--aaa->>" + this.GoodsCheckBillID);
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/getProductCheckOrder',
|
||||
method: 'get',
|
||||
data: {
|
||||
'id': parseInt(this.GoodsCheckBillID),
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data.data));
|
||||
this.GoodsDetailList = [];
|
||||
this.GoodsCheckBillNo = res.data.data.order_no;
|
||||
this.StoreName = res.data.data.warehouse_name
|
||||
this.StoreStationName = res.data.data.warehouse_bin_name;
|
||||
this.GoodsCheckBillDate = this.$u.timeFormat(res.data.data.check_time, 'yyyy-mm-dd')
|
||||
/* this.BillSumOldRoll = res.data.data.item_data.roll;
|
||||
this.BillSumNewRoll = res.data.data.item_data.check_roll; */
|
||||
var aResultData = res.data.data.item_data;
|
||||
this.BillSumOldRoll = 0;
|
||||
this.BillSumNewRoll = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
aResultData[i].roll = aResultData[i].roll / 100;
|
||||
aResultData[i].check_roll = aResultData[i].check_roll / 100;
|
||||
aResultData[i].different_roll = aResultData[i].different_roll / 100;
|
||||
|
||||
this.BillSumOldRoll = this.BillSumOldRoll + aResultData[i].roll;
|
||||
this.BillSumNewRoll = this.BillSumNewRoll + aResultData[i].check_roll;
|
||||
};
|
||||
|
||||
this.GoodsDetailList = aResultData;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.showError('当前单据未提交,不能审核或消审!');
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == '') {
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
// if (this.CommitProcName == '') {
|
||||
// this.playError();
|
||||
// this.BillDataMessage = '当前' + aCommitRecallName + '操作配置有误,不能审核!';
|
||||
// return;
|
||||
// }
|
||||
console.log('GoodsCheckBillID',this.GoodsCheckBillID)
|
||||
util.request({
|
||||
url: '/product/productCheckOrder/updateProductCheckOrderAuditStatusPass',
|
||||
method: 'put',
|
||||
data: {
|
||||
'id': parseInt(this.GoodsCheckBillID),
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('审核',res)
|
||||
if (res.data.code == '0') {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
console.log('aResultData',aResultData)
|
||||
if (aResultData.code == '0' && aResultData.msg ==
|
||||
'success') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核') {
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.showError(aCommitRecallName + '出错!' + aResultData.BillDataMessage);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.showError(aCommitRecallName + '出错,' + res.data.msg);
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!');
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view class="myCard" >
|
||||
<view class="cardTopName">盘点单号:{{item.order_no}}</view>
|
||||
<view class="cardRow">
|
||||
<view>盘点日期:</view>
|
||||
<view>{{this.$u.timeFormat(item.check_time,'yyyy-mm-dd')}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>仓库名称:</view>
|
||||
<view>{{item.warehouse_name}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>仓位名称:</view>
|
||||
<view>{{item.warehouse_bin_name}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>创 建 人:</view>
|
||||
<view>{{item.create_user_name}} {{this.$u.timeFormat(item.create_time,'yyyy-mm-dd hh:ss:MM')}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>审 核 人:</view>
|
||||
<view>{{item.auditor_name}} {{this.$u.timeFormat(item.audit_date,'yyyy-mm-dd hh:ss:MM')}}</view>
|
||||
</view>
|
||||
<view v-if="!isDetail && !isSelect" class="lookDetail">
|
||||
<text>查看详情</text>
|
||||
<u-icon name="arrow-right" size="36"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isDetail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onlaunch(e) {
|
||||
//console.log("---->>>" + item.OpDate);
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view>
|
||||
<button type="primary" @click="onShowDatePicker('range')">单据日期 {{range[0]}} - {{range[1]}}</button>
|
||||
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchBillNo" :show-action="false"
|
||||
@custom="onTabChange" @search="onTabChange"
|
||||
placeholder="请输入单号或往来单位">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false"
|
||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
|
||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||
<view v-for="(item, index) in ItemDataList" :key="index" @click="cardClickFun(item, index)">
|
||||
<GoodsBusinessInItem :item="item" :isSelect="isSelect" :index="index"></GoodsBusinessInItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<addBtn url="./storeGoodsBusinessInAdd"></addBtn>
|
||||
<mx-date-picker :show="showPicker" :type="BillDatetype" :value="BillDatevalue"
|
||||
:show-tips="true" :begin-text="'开始'" :end-text="'结束'"
|
||||
:show-seconds="false" @confirm="BillDateConfirm" @cancel="BillDateConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import GoodsBusinessInItem from '@/components/card/storeGoodsBusinessInItem.vue';
|
||||
import util from '../../common/util';
|
||||
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
||||
export default {
|
||||
components: {
|
||||
GoodsBusinessInItem,
|
||||
MxDatePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
searchBillNo: '',
|
||||
showPicker: false,
|
||||
BillBeginDate: new Date(new Date()-24*60*60*1000).toLocaleDateString(),
|
||||
BillEndDate: new Date().toLocaleDateString(),
|
||||
range: [new Date(new Date()-24*60*60*1000).toLocaleDateString(), new Date().toLocaleDateString()],
|
||||
BillDatetype: 'range',
|
||||
BillDatevalue: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreGoodsBusinessInData();
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
//this.doRefresh(this.tbOrderCouponList)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function () {
|
||||
console.log("activeTabIndex参数改变,111即将刷新..." + this.activeTabIndex);
|
||||
/*
|
||||
if (this.pagination.hasNextPage) {
|
||||
this.doInfinite()
|
||||
}
|
||||
*/
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
//uni.$off('deleteCardFun', that.deleteCardFun);
|
||||
//uni.$off('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
//uni.$off('addBjdItemInListFun', that.addBjdItemInListFun);
|
||||
},
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
console.log("-----index------>>>>>>>" + this.activeTabIndex);
|
||||
console.log("----------->>>>>>>" + this.searchBillNo);
|
||||
if (this.activeTabIndex == 0){
|
||||
console.log("---------Not Commit-->>>>>>>");
|
||||
this.StoreGoodsBusinessInData();
|
||||
} else {
|
||||
console.log("---------Has Commit-->>>>>>>");
|
||||
this.StoreGoodsBusinessInDataCommit();
|
||||
}
|
||||
},
|
||||
|
||||
onShowDatePicker(type){//显示
|
||||
this.BillDatetype = type;
|
||||
this.showPicker = true;
|
||||
this.BillDatevalue = this[type];
|
||||
},
|
||||
|
||||
BillDateConfirm(e) {//选择
|
||||
this.showPicker = false;
|
||||
if(e) {
|
||||
this[this.BillDatetype] = e.value;
|
||||
this.BillBeginDate = e.value[0];
|
||||
this.BillEndDate = e.value[1];
|
||||
}
|
||||
},
|
||||
|
||||
StoreGoodsBusinessInData: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
console.log("000000000000---" + this.searchBillNo);
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessInDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: '0'
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%'+this.searchBillNo+'%'
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}, {
|
||||
name: 'PLANLOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreGoodsBusinessInDataCommit: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessInDataCommitSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: '1'
|
||||
},{
|
||||
name: 'BeginDate',
|
||||
value: this.BillBeginDate
|
||||
},{
|
||||
name: 'EndDate',
|
||||
value: this.BillEndDate
|
||||
},{
|
||||
name: 'BillNo',
|
||||
value: '%'+this.searchBillNo+'%'
|
||||
},{
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
},{
|
||||
name: 'PLANLOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storegoods/storeGoodsBusinessInDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.test{
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
button{
|
||||
margin: 20upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,583 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单号:{{GoodsInBillNo}}</text>
|
||||
<text class="title" style="width:200px;">日期:{{GoodsInBillDate}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单据类型:{{BillTypeName}}</text>
|
||||
<text class="title" style="width:200px;">营销部门:{{PlanDepartmentName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
||||
<text class="title" style="width:200px;">来源仓库:{{FromStoreName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">往来单位:{{CustomerName}}</text>
|
||||
<text class="title" style="width:200px;">销 售 员:{{SaleUserName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" maxlength="-1" :focus="testFocus1" style="width:150px;" @confirm="GoodsInBillDetailScan" />
|
||||
<checkbox-group @change="AllCrockNoCheckChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||
</checkbox-group>
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单条数:{{BillSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本单重量:{{BillSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色重量:{{GoodsCodeSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"/>
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<!-- <u-action-sheet :list="InDetailList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
let that = '';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
disabled: false,
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
AllCrockNoScanStatus: false,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsInBillID: 0,
|
||||
GoodsInBillNo: '',
|
||||
GoodsInBillDate: '',
|
||||
GoodsInBillMasterNo: '',
|
||||
BillTypeName: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
FromStoreNameID: '',
|
||||
FromStoreName: '',
|
||||
CustomerID: '',
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: '',
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: '',
|
||||
SaleUserName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
testFocus0: false,
|
||||
testFocus1: true,
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
GoodsCodeSumRoll: 0,
|
||||
GoodsCodeSumQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.GoodsInBillID = e.billid;
|
||||
}
|
||||
this.GoodsInBillDetailData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
AllCrockNoCheckChange:function () {
|
||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||
},
|
||||
|
||||
BarCodeDelChange:function () {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreStationName',
|
||||
params: [{
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
//this.testFocus1 = false;
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsInBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsInBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
console.log("this.QRBarCode ---->>" + this.QRBarCode);
|
||||
|
||||
let aBarCodeDelStatus = 0;
|
||||
if (this.BarCodeDelStatus){
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
let aAllCrockNoScanStatus = 0;
|
||||
if (this.AllCrockNoScanStatus){
|
||||
aAllCrockNoScanStatus = '1';
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreGoodsBusinessInBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.GoodsInBillID
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: this.QRBarCode
|
||||
},
|
||||
{
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
},
|
||||
{
|
||||
name: '@AllCrockNoScanStatus',
|
||||
value: aAllCrockNoScanStatus
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationName
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNo = aResultData.CrockNo;
|
||||
this.GoodsBillNo = aResultData.GoodsBillNo;
|
||||
this.GoodsQty = aResultData.GoodsQty;
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.GoodsCodeSumRoll = parseFloat(aResultData.GoodsCodeSumRoll);
|
||||
this.GoodsCodeSumQty = parseFloat(aResultData.GoodsCodeSumQty);
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.GoodsInBillDetailData();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '盘点扫描出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsInBillDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessInDetailDataSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.GoodsInBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.GoodsInBillID = aResultData[0].BillMasterID;
|
||||
this.GoodsInBillNo = aResultData[0].BillNo;
|
||||
this.GoodsInBillDate = aResultData[0].BillDate;
|
||||
this.BillTypeName = aResultData[0].BillTypeName;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.PlanDepartmentName = aResultData[0].PlanDepartmentName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.FromStoreName = aResultData[0].FromStoreName;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.SaleUserName = aResultData[0].SaleUserName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2);
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2);
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核或消审!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.GoodsInBillID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.GoodsInBillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<view>
|
||||
<button type="primary" @click="onShowDatePicker('range')">单据日期 {{range[0]}} - {{range[1]}}</button>
|
||||
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchBillNo" :show-action="false"
|
||||
@custom="onTabChange" @search="onTabChange"
|
||||
placeholder="请输入单号或往来单位">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false"
|
||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关出仓资料" title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||
<view v-for="(item, index) in ItemDataList" :key="index" @click="cardClickFun(item, index)">
|
||||
<GoodsBusinessOutItem :item="item" :isSelect="isSelect" :index="index"></GoodsBusinessOutItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<addBtn url="./storeGoodsBusinessOutAdd"></addBtn>
|
||||
<mx-date-picker :show="showPicker" :type="BillDatetype" :value="BillDatevalue"
|
||||
:show-tips="true" :begin-text="'开始'" :end-text="'结束'"
|
||||
:show-seconds="false" @confirm="BillDateConfirm" @cancel="BillDateConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import GoodsBusinessOutItem from '@/components/card/storeGoodsBusinessOutItem.vue';
|
||||
import util from '../../common/util';
|
||||
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
||||
export default {
|
||||
components: {
|
||||
GoodsBusinessOutItem,
|
||||
MxDatePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
searchBillNo: '',
|
||||
showPicker: false,
|
||||
BillBeginDate: new Date(new Date()-24*60*60*1000).toLocaleDateString(),
|
||||
BillEndDate: new Date().toLocaleDateString(),
|
||||
range: [new Date(new Date()-24*60*60*1000).toLocaleDateString(), new Date().toLocaleDateString()],
|
||||
BillDatetype: 'range',
|
||||
BillDatevalue: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreGoodsBusinessOutData();
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
this.onTabChange(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function () {
|
||||
console.log("activeTabIndex参数改变,即将刷新..." + this.activeTabIndex);
|
||||
/*
|
||||
if (this.pagination.hasNextPage) {
|
||||
this.doInfinite()
|
||||
}
|
||||
*/
|
||||
},
|
||||
onBackPress() {
|
||||
/*uni.$off('deleteCardFun', that.deleteCardFun);
|
||||
uni.$off('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
uni.$off('addBjdItemInListFun', that.addBjdItemInListFun);*/
|
||||
},
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
if (this.activeTabIndex == 0) {
|
||||
console.log("---->>未审核<<----");
|
||||
this.StoreGoodsBusinessOutData();
|
||||
} else {
|
||||
console.log("---->>已审核<<----");
|
||||
this.StoreGoodsBusinessOutDataCommit();
|
||||
}
|
||||
},
|
||||
|
||||
onShowDatePicker(type){//显示
|
||||
this.BillDatetype = type;
|
||||
this.showPicker = true;
|
||||
this.BillDatevalue = this[type];
|
||||
},
|
||||
|
||||
BillDateConfirm(e) {//选择
|
||||
this.showPicker = false;
|
||||
if(e) {
|
||||
this[this.BillDatetype] = e.value;
|
||||
this.BillBeginDate = e.value[0];
|
||||
this.BillEndDate = e.value[1];
|
||||
}
|
||||
},
|
||||
|
||||
StoreGoodsBusinessOutData: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessOutDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%' + this.searchBillNo + '%'
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}, {
|
||||
name: 'PLANLOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = [];
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreGoodsBusinessOutDataCommit: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessOutDataCommitSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: '1'
|
||||
},{
|
||||
name: 'BeginDate',
|
||||
value: this.BillBeginDate
|
||||
},{
|
||||
name: 'EndDate',
|
||||
value: this.BillEndDate
|
||||
},{
|
||||
name: 'BillNo',
|
||||
value: '%'+this.searchBillNo+'%'
|
||||
},{
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
},{
|
||||
name: 'PLANLOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
that.ItemDataList = [];
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storegoods/storeGoodsBusinessOutDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
button{
|
||||
margin: 20upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,580 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单号:{{GoodsOutBillNo}}</text>
|
||||
<text class="title" style="width:200px;">日期:{{GoodsOutBillDate}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单据类型:{{BillTypeName}}</text>
|
||||
<text class="title" style="width:200px;">营销部门:{{PlanDepartmentName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
||||
<text class="title" style="width:200px;">调至仓库:{{ToStoreName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">往来单位:{{CustomerName}}</text>
|
||||
<text class="title" style="width:200px;">销 售 员:{{SaleUserName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" maxlength="-1" :focus="testFocus1" style="width:150px;" @confirm="GoodsOutBillDetailScan" />
|
||||
<checkbox-group @change="AllCrockNoCheckChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||
</checkbox-group>
|
||||
<checkbox-group @change="BarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="BarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单条数:{{BillSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本单重量:{{BillSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色重量:{{GoodsCodeSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"/>
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<!-- <u-action-sheet :list="InDetailList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
let that = '';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
actionSheetShow: false,
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
QRBarCode: '',
|
||||
AllCrockNoScanStatus: false,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsOutBillID: 0,
|
||||
GoodsOutBillNo: '',
|
||||
GoodsOutBillDate: '',
|
||||
GoodsOutBillMasterNo: '',
|
||||
BillTypeName: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
ToStoreNameID: '',
|
||||
ToStoreName: '',
|
||||
CustomerID: '',
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: '',
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: '',
|
||||
SaleUserName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
testFocus0: false,
|
||||
testFocus1: true,
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
GoodsCodeSumRoll: 0,
|
||||
GoodsCodeSumQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.GoodsOutBillID = e.billid;
|
||||
}
|
||||
this.GoodsOutBillDetailData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
AllCrockNoCheckChange:function () {
|
||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||
},
|
||||
|
||||
BarCodeDelChange:function () {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreStationName',
|
||||
params: [{
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
//this.testFocus1 = false;
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsOutBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsOutBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
console.log("this.QRBarCode ---->>" + this.QRBarCode);
|
||||
|
||||
let aBarCodeDelStatus = 0;
|
||||
if (this.BarCodeDelStatus){
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
let aAllCrockNoScanStatus = 0;
|
||||
if (this.AllCrockNoScanStatus){
|
||||
aAllCrockNoScanStatus = '1';
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreGoodsBusinessOutBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.GoodsOutBillID
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: this.QRBarCode
|
||||
},
|
||||
{
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
},
|
||||
{
|
||||
name: '@AllCrockNoScanStatus',
|
||||
value: aAllCrockNoScanStatus
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationName
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNo = aResultData.CrockNo;
|
||||
this.GoodsBillNo = aResultData.GoodsBillNo;
|
||||
this.GoodsQty = aResultData.GoodsQty;
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.GoodsCodeSumRoll = parseFloat(aResultData.GoodsCodeSumRoll);
|
||||
this.GoodsCodeSumQty = parseFloat(aResultData.GoodsCodeSumQty);
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.GoodsOutBillDetailData();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '盘点扫描出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
this.BillDataMessage = '盘点扫描出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsOutBillDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessOutDetailDataSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.GoodsOutBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("--AAAA-->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.GoodsOutBillID = aResultData[0].BillMasterID;
|
||||
this.GoodsOutBillNo = aResultData[0].BillNo;
|
||||
this.GoodsOutBillDate = aResultData[0].BillDate;
|
||||
this.BillTypeName = aResultData[0].BillTypeName;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.PlanDepartmentName = aResultData[0].PlanDepartmentName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.ToStoreName = aResultData[0].ToStoreName;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.SaleUserName = aResultData[0].SaleUserName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2);
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2);
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核或消审!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.GoodsOutBillID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.GoodsOutBillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<view>
|
||||
<button type="primary" @click="onShowDatePicker('range')">单据日期 {{range[0]}} - {{range[1]}}</button>
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchBillNo" :show-action="false"
|
||||
@custom="onTabChange" @search="onTabChange"
|
||||
placeholder="请输入单号或往来单位">
|
||||
</u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false"
|
||||
:current="activeTabIndex" @change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
<dataNull v-if="ItemDataList.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关移仓资料" title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray">
|
||||
<view v-for="(item, index) in ItemDataList" :key="index" @click="cardClickFun(item, index)">
|
||||
<GoodsBusinessStationMoveItem :item="item" :isSelect="isSelect" :index="index"></GoodsBusinessStationMoveItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<addBtn url="./storeGoodsBusinessStationMoveAdd"></addBtn>
|
||||
<mx-date-picker :show="showPicker" :type="BillDatetype" :value="BillDatevalue"
|
||||
:show-tips="true" :begin-text="'开始'" :end-text="'结束'"
|
||||
:show-seconds="false" @confirm="BillDateConfirm" @cancel="BillDateConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import GoodsBusinessStationMoveItem from '@/components/card/storeGoodsBusinessStationMoveItem.vue';
|
||||
import util from '../../common/util';
|
||||
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
||||
export default {
|
||||
components: {
|
||||
GoodsBusinessStationMoveItem,
|
||||
MxDatePicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
searchBillNo: '',
|
||||
showPicker: false,
|
||||
BillBeginDate: new Date(new Date()-24*60*60*1000).toLocaleDateString(),
|
||||
BillEndDate: new Date().toLocaleDateString(),
|
||||
range: [new Date(new Date()-24*60*60*1000).toLocaleDateString(), new Date().toLocaleDateString()],
|
||||
BillDatetype: 'range',
|
||||
BillDatevalue: ''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreGoodsBusinessStationMoveData();
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
this.onTabChange(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function () {
|
||||
console.log("activeTabIndex参数改变,即将刷新..." + this.activeTabIndex);
|
||||
/*
|
||||
if (this.pagination.hasNextPage) {
|
||||
this.doInfinite()
|
||||
}
|
||||
*/
|
||||
},
|
||||
/* onBackPress() {
|
||||
uni.$off('deleteCardFun', that.deleteCardFun);
|
||||
uni.$off('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
uni.$off('addBjdItemInListFun', that.addBjdItemInListFun);
|
||||
}, */
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
if (this.activeTabIndex == 0) {
|
||||
console.log("---->>未审核<<----");
|
||||
this.StoreGoodsBusinessStationMoveData();
|
||||
} else {
|
||||
console.log("---->>已审核<<----");
|
||||
this.StoreGoodsBusinessStationMoveDataCommit();
|
||||
}
|
||||
},
|
||||
|
||||
onShowDatePicker(type){//显示
|
||||
this.BillDatetype = type;
|
||||
this.showPicker = true;
|
||||
this.BillDatevalue = this[type];
|
||||
},
|
||||
|
||||
BillDateConfirm(e) {//选择
|
||||
this.showPicker = false;
|
||||
if(e) {
|
||||
this[this.BillDatetype] = e.value;
|
||||
this.BillBeginDate = e.value[0];
|
||||
this.BillEndDate = e.value[1];
|
||||
}
|
||||
},
|
||||
|
||||
StoreGoodsBusinessStationMoveData: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessStationMoveDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%' + this.searchBillNo + '%'
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
//console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = [];
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreGoodsBusinessStationMoveDataCommit: function() {
|
||||
that.ItemDataList = [];
|
||||
let aCommitStatus = 0;
|
||||
if (this.activeTabIndex == 0) {
|
||||
aCommitStatus = 0
|
||||
}
|
||||
else if (this.activeTabIndex == 1) {
|
||||
aCommitStatus = 1
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessStationMoveDataCommitSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
name: 'BillNo',
|
||||
value: '%' + this.searchBillNo + '%'
|
||||
}, {
|
||||
name: 'BeginDate',
|
||||
value: this.BillBeginDate
|
||||
}, {
|
||||
name: 'EndDate',
|
||||
value: this.BillEndDate
|
||||
}, {
|
||||
name: 'LOGINID',
|
||||
value: getApp().globalData.LoginID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
that.ItemDataList = [];
|
||||
//console.log("---->" + JSON.stringify(res.data));
|
||||
that.ItemDataList = that.ItemDataList.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storegoods/storeGoodsBusinessStationMoveDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
button{
|
||||
margin: 20upx;
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,955 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-form ref="uForm">
|
||||
<view class="flex-white-plr26 ptb10 mt32 bdb_f5">
|
||||
<text class="mr26">移仓凭证</text>
|
||||
<u-input disabled placeholder="自动生成" v-model="GoodsStationMoveBillNo" />
|
||||
<text class="mr26">移仓日期</text> {{$u.timeFormat(GoodsStationMoveBillDate, 'yyyy-mm-dd')}}
|
||||
</view>
|
||||
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
||||
<view :class="StoreName ? '' : 'cBlack'"> {{StoreName ? StoreName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="pickerSelectFun('单据类型')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26">单据类型<text class="redXingh">*</text></text>
|
||||
<view :class="BillTypeName ? '' : 'cBlack'"> {{BillTypeName ? BillTypeName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26" >移出仓位<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="FromStoreStationNo" :focus="FromStoreStationFocus"
|
||||
style="width:100px;" @confirm="GetFromStoreStationName" />
|
||||
<text class="title" style="width:100px;">{{FromStoreStationName}}</text>
|
||||
|
||||
<checkbox-group @change="AllCrockNoCheckChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text class="mr26" >移至仓位<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="StoreStationNo" :focus="ToStoreStationFocus"
|
||||
style="width:100px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:100px;">{{StoreStationName}}</text>
|
||||
|
||||
<checkbox-group @change="AllStoreStationChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<view class="flex-white-plr26-column ptb20 mt32">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
<text>备注内容</text>
|
||||
</view>
|
||||
<u-input v-model="Remark" maxlength="-1" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||
</view>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" maxlength="-1" v-model="QRBarCode" :focus="QRBarCodeFocus"
|
||||
style="width:230px;" @confirm="GoodsStationMoveBillDetailScan" />
|
||||
|
||||
<checkbox-group @change="QRBarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="QRBarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单条数:{{BillSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本单重量:{{BillSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本架条数:{{StoreStationSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本架重量:{{StoreStationSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色重量:{{GoodsCodeSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"
|
||||
@onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="submitBtnFun">
|
||||
{{pageType ? '保存' : '提交'}}
|
||||
</u-button>
|
||||
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
<!--组件-->
|
||||
<!-- <u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
|
||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
selectType: '',
|
||||
pageType: '',
|
||||
CommitType: '',
|
||||
CommitProcName: '',
|
||||
GoodsStationMoveBillID: 0,
|
||||
GoodsStationMoveBillNo: '',
|
||||
GoodsStationMoveBillDate: '',
|
||||
GoodsStationMoveBillMasterNo: '',
|
||||
ScanStoreStationName: '',
|
||||
AllCrockNoScanStatus: false,
|
||||
AllStoreStationScanStatus: false,
|
||||
QRBarCodeDelStatus: false,
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
FromStoreStationNo: '',
|
||||
FromStoreStationName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
BillBusinessID: 0,
|
||||
BillTypeName: '',
|
||||
actionSheetShow: false,
|
||||
Remark: '',
|
||||
GoodsDetailList:[],
|
||||
StoreNameDataList: [],
|
||||
BillBusinessDataList: [],
|
||||
QRBarCode: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
FromStoreStationFocus: false,
|
||||
ToStoreStationFocus: true,
|
||||
QRBarCodeFocus: false,
|
||||
StoreStationSumRoll: 0,
|
||||
StoreStationSumQty: 0,
|
||||
GoodsCodeSumRoll: 0,
|
||||
GoodsCodeSumQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cpList: function(val, old) {
|
||||
that.cpCalcFun();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
this.getStoreNameData();
|
||||
|
||||
setTimeout(() => {
|
||||
this.getBillBusinessData();
|
||||
}, 500);
|
||||
|
||||
/* uni.$on('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$on('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$on('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$on('shangjiBindFun', that.shangjiBindFun) */
|
||||
},
|
||||
|
||||
onBackPress() {
|
||||
/* uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$off('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$off('shangjiBindFun', that.shangjiBindFun) */
|
||||
},
|
||||
methods: {
|
||||
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
AllCrockNoCheckChange:function () {
|
||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||
},
|
||||
|
||||
AllStoreStationChange:function () {
|
||||
this.AllStoreStationScanStatus = !this.AllStoreStationScanStatus;
|
||||
},
|
||||
|
||||
BarCodeDelChange:function () {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
pickerSelectFun: function(str) {
|
||||
console.log("---->>>" + str);
|
||||
that.selectList = [];
|
||||
if (str == '仓库名称') {
|
||||
that.selectList = this.StoreNameDataList;
|
||||
} else if (str == '单据类型') {
|
||||
that.selectList = this.BillBusinessDataList;
|
||||
}
|
||||
|
||||
that.selectShow = true;
|
||||
that.selectType = str;
|
||||
},
|
||||
// 选择框选中事件
|
||||
selectConfirmFun: function(e) {
|
||||
if (that.selectType == '仓库名称') {
|
||||
that.StoreNameID = e[0].value;
|
||||
that.StoreName = e[0].label;
|
||||
} else if (that.selectType == '单据类型') {
|
||||
that.BillBusinessID = e[0].value;
|
||||
that.BillTypeName = e[0].label;
|
||||
}
|
||||
},
|
||||
|
||||
getStoreNameData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: '%StoreFabricGoods%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreNameDataList.push({
|
||||
value: aResultData[i].StoreNameID,
|
||||
label: aResultData[i].StoreName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.StoreNameDataList = [];
|
||||
} else {
|
||||
this.StoreNameDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameStoreStationName',
|
||||
params: [{
|
||||
name: 'SID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.ToStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.ToStoreStationFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetFromStoreStationName: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameStoreStationName',
|
||||
params: [{
|
||||
name: 'SID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: 'No',
|
||||
value: this.FromStoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.FromStoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.ToStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.ToStoreStationFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.FromStoreStationName = "",
|
||||
this.FromStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.FromStoreStationFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
getBillBusinessData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetBillBusinessList',
|
||||
params: [{
|
||||
name: 'TypeStatus',
|
||||
value: '5'
|
||||
}, {
|
||||
name: 'TypeNo',
|
||||
value: 'BusinessTypeStoreGoods'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count == 1) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessID = aResultData[i].BillBusinessID;
|
||||
this.BillTypeName = aResultData[i].BillTypeName;
|
||||
this.BillBusinessDataList.push({
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
}
|
||||
else if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BillBusinessDataList.push({
|
||||
value: aResultData[i].BillBusinessID,
|
||||
label: aResultData[i].BillTypeName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.BillBusinessDataList = [];
|
||||
} else {
|
||||
this.BillBusinessDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStationMoveBillDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessStationMoveDetailDataSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2);
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2);
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 日期修改
|
||||
bindDateChange: function(e) {
|
||||
that.bjdDate = e.detail.value;
|
||||
that.bjdDateTime = new Date(e.detail.value + ' 00:00:00').getTime()
|
||||
},
|
||||
// 展示相应数据选择框
|
||||
|
||||
|
||||
scanFun: function() {
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
that.code = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择所属客户
|
||||
selectCustomer: function() {
|
||||
uni.navigateTo({
|
||||
url: '../basedata/customer/customer?type=染整厂'
|
||||
})
|
||||
},
|
||||
// 绑定客户
|
||||
bjdKehuBindFun: function(e) {
|
||||
console.log("CustomerName===" + e.CustomerName);
|
||||
that.CustomerID = e.CustomerID;
|
||||
that.CustomerName = e.CustomerName;
|
||||
that.PlanDepartmentID = e.PlanDepartmentID;
|
||||
that.PlanDepartmentName = e.PlanDepartmentName;
|
||||
that.SaleUserID = e.SaleUserID;
|
||||
that.SaleUserName = e.SaleUserName;
|
||||
that.SaleCustomerAddress = e.CustomerAddress + ' ' + e.CustomerPhone + ' ' + e.CustomerLinkName;
|
||||
|
||||
/*
|
||||
that.clientId = e.clientId;
|
||||
that.clientName = e.clientName;
|
||||
*/
|
||||
},
|
||||
|
||||
// 提交按钮方法
|
||||
submitBtnFun: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
if (this.BillTypeName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '单据类型不能为空,请先输入单据类型!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓位名称不能为空,请先输入仓位编号!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.GoodsStationMoveBillID > 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据已经提交,不能重复提交!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreGoodsBusinessStationMoveBillMaster',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
},
|
||||
{
|
||||
name: '@BillBusinessID',
|
||||
value: this.BillBusinessID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@ScanStoreStationName',
|
||||
value: this.StoreStationName
|
||||
},
|
||||
{
|
||||
name: '@Remark',
|
||||
value: this.Remark
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
console.log("-->>" + JSON.stringify(res.data));
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.GoodsStationMoveBillID = aResultData.GoodsStationMoveBillID;
|
||||
this.GoodsStationMoveBillNo = aResultData.GoodsStationMoveBillNo;
|
||||
this.GoodsCheckBillDetailData();
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '提交出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '提交出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStationMoveBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsStationMoveBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
console.log("this.QRBarCode ---->>" + this.QRBarCode);
|
||||
|
||||
let aBarCodeDelStatus = '0';
|
||||
if (this.BarCodeDelStatus){
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
let aAllCrockNoScanStatus = '0';
|
||||
if (this.AllCrockNoScanStatus){
|
||||
aAllCrockNoScanStatus = '1';
|
||||
};
|
||||
|
||||
let aAllStoreStationScanStatus = '0'
|
||||
if (this.AllStoreStationScanStatus){
|
||||
aAllStoreStationScanStatus = '1';
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreGoodsBusinessStationMoveBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
}, {
|
||||
name: '@QRBarCode',
|
||||
value: this.QRBarCode
|
||||
}, {
|
||||
name: '@FromStoreStationName',
|
||||
value: this.FromStoreStationName
|
||||
}, {
|
||||
name: '@ToStoreStationName',
|
||||
value: this.StoreStationName
|
||||
}, {
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: '@AllStoreStationScanStatus',
|
||||
value: aAllStoreStationScanStatus
|
||||
}, {
|
||||
name: '@AllCrockNoScanStatus',
|
||||
value: aAllCrockNoScanStatus
|
||||
}, {
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNo = aResultData.CrockNo;
|
||||
this.GoodsBillNo = aResultData.GoodsBillNo;
|
||||
this.GoodsQty = aResultData.GoodsQty;
|
||||
this.GoodsCodeSumRoll = parseFloat(aResultData.GoodsCodeSumRoll);
|
||||
this.GoodsCodeSumQty = parseFloat(aResultData.GoodsCodeSumQty);
|
||||
this.StoreStationSumRoll = parseFloat(aResultData.StoreStationSumRoll);
|
||||
this.StoreStationSumQty = parseFloat(aResultData.StoreStationSumQty);
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.GoodsStationMoveBillDetailData();
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '移仓扫描出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '移仓扫描出错,' + res.data.msg;
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '移仓扫描出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核或消审!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.GoodsCheckBillID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.GoodsCheckBillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,657 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">单号:{{GoodsStationMoveBillNo}}</text>
|
||||
<text class="title" style="width:200px;">日期:{{GoodsStationMoveBillDate}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">仓库名称:{{StoreName}}</text>
|
||||
<text class="title" style="width:200px;">仓位名称:{{ScanStoreStationName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="mr26" >移出仓位<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="FromStoreStationNo" :focus="FromStoreStationFocus" style="width:100px;" @confirm="GetFromStoreStationName" />
|
||||
<text class="title" style="width:120px;">{{FromStoreStationName}}</text>
|
||||
<checkbox-group @change="AllCrockNoCheckChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="mr26" >移至仓位<text class="redXingh">*</text></text>
|
||||
<input type="text" v-model="StoreStationNo" :focus="ToStoreStationFocus"
|
||||
style="width:100px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:120px;">{{StoreStationName}}</text>
|
||||
<checkbox-group @change="AllStoreStationChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" maxlength="-1" :focus="QRBarCodeFocus" style="width:220px;"
|
||||
@confirm="GoodsStationMoveBillDetailScan" />
|
||||
<checkbox-group @change="QRBarCodeDelChange">
|
||||
<checkbox ref="checkBoxRef" :checked="QRBarCodeDelStatus">删除</checkbox>
|
||||
</checkbox-group>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单条数:{{BillSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本单重量:{{BillSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本架条数:{{StoreStationSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本架重量:{{StoreStationSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色重量:{{GoodsCodeSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸重量:{{CrockNoSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"/>
|
||||
</view>
|
||||
<view class="submitView">
|
||||
<u-button type="primary" style="width:100px;" class="commitBtn"
|
||||
:ripple="true" ripple-bg-color="#909399" @click="commitBtnFun">
|
||||
{{CommitType ? '消审' : '审核'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
let that = '';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
CommitType:'',
|
||||
CommitProcName: '',
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
GoodsStationMoveBillID: 0,
|
||||
GoodsStationMoveBillNo: '',
|
||||
GoodsStationMoveBillDate: '',
|
||||
GoodsStationMoveBillMasterNo: '',
|
||||
AllCrockNoScanStatus: false,
|
||||
AllStoreStationScanStatus: false,
|
||||
QRBarCodeDelStatus: false,
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
FromStoreStationNo: '',
|
||||
FromStoreStationName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
ScanStoreStationName: '',
|
||||
CustomerName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
FromStoreStationFocus: false,
|
||||
ToStoreStationFocus: true,
|
||||
QRBarCodeFocus: false,
|
||||
StoreStationSumRoll: 0,
|
||||
StoreStationSumQty: 0,
|
||||
GoodsCodeSumRoll: 0,
|
||||
GoodsCodeSumQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
BillSumRoll: 0,
|
||||
BillSumQty: 0,
|
||||
BarCodeDelStatus: false,
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.GoodsStationMoveBillID = e.billid;
|
||||
}
|
||||
this.GoodsStationMoveBillDetailData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
AllCrockNoCheckChange:function () {
|
||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||
},
|
||||
|
||||
AllStoreStationChange:function () {
|
||||
this.AllStoreStationScanStatus = !this.AllStoreStationScanStatus;
|
||||
},
|
||||
|
||||
BarCodeDelChange:function () {
|
||||
this.BarCodeDelStatus = !this.BarCodeDelStatus;
|
||||
},
|
||||
|
||||
GetStoreStationName: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameStoreStationName',
|
||||
params: [{
|
||||
name: 'SID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: 'No',
|
||||
value: this.StoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.ToStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.ToStoreStationFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetFromStoreStationName: function() {
|
||||
if (this.StoreName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓库名称不能为空,请先输入仓库名称!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameStoreStationName',
|
||||
params: [{
|
||||
name: 'SID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: 'No',
|
||||
value: this.FromStoreStationNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.FromStoreStationName = aResultData[i].StoreStationName;
|
||||
};
|
||||
this.ToStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.ToStoreStationFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.FromStoreStationName = "",
|
||||
this.FromStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.FromStoreStationFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStationMoveBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.GoodsStationMoveBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
console.log("this.QRBarCode ---->>" + this.QRBarCode);
|
||||
|
||||
let aBarCodeDelStatus = '0';
|
||||
if (this.BarCodeDelStatus){
|
||||
aBarCodeDelStatus = '1';
|
||||
};
|
||||
|
||||
let aAllCrockNoScanStatus = '0';
|
||||
if (this.AllCrockNoScanStatus){
|
||||
aAllCrockNoScanStatus = '1';
|
||||
};
|
||||
|
||||
let aAllStoreStationScanStatus = '0'
|
||||
if (this.AllStoreStationScanStatus){
|
||||
aAllStoreStationScanStatus = '1';
|
||||
};
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreGoodsBusinessStationMoveBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
}, {
|
||||
name: '@QRBarCode',
|
||||
value: this.QRBarCode
|
||||
}, {
|
||||
name: '@FromStoreStationName',
|
||||
value: this.FromStoreStationName
|
||||
}, {
|
||||
name: '@ToStoreStationName',
|
||||
value: this.StoreStationName
|
||||
}, {
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
}, {
|
||||
name: '@AllStoreStationScanStatus',
|
||||
value: aAllStoreStationScanStatus
|
||||
}, {
|
||||
name: '@AllCrockNoScanStatus',
|
||||
value: aAllCrockNoScanStatus
|
||||
}, {
|
||||
name: '@BarCodeDelStatus',
|
||||
value: aBarCodeDelStatus
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
console.log(res.data.data.toString());
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.FabricGoodsNo = aResultData.FabricGoodsNo;
|
||||
this.FabricGoodsName = aResultData.FabricGoodsName;
|
||||
this.GoodsCodeNo = aResultData.GoodsCodeNo;
|
||||
this.GoodsCodeName = aResultData.GoodsCodeName;
|
||||
this.CrockNo = aResultData.CrockNo;
|
||||
this.GoodsBillNo = aResultData.GoodsBillNo;
|
||||
this.GoodsQty = aResultData.GoodsQty;
|
||||
this.GoodsCodeSumRoll = parseFloat(aResultData.GoodsCodeSumRoll);
|
||||
this.GoodsCodeSumQty = parseFloat(aResultData.GoodsCodeSumQty);
|
||||
this.StoreStationSumRoll = parseFloat(aResultData.StoreStationSumRoll);
|
||||
this.StoreStationSumQty = parseFloat(aResultData.StoreStationSumQty);
|
||||
this.CrockNoSumRoll = parseFloat(aResultData.CrockNoSumRoll);
|
||||
this.CrockNoSumQty = parseFloat(aResultData.CrockNoSumQty);
|
||||
this.BillSumRoll = parseFloat(aResultData.BillSumRoll);
|
||||
this.BillSumQty = parseFloat(aResultData.BillSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.GoodsStationMoveBillDetailData();
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '移仓扫描出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '移仓扫描出错,' + res.data.msg;
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
this.BillDataMessage = '移仓扫描出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStationMoveBillDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsBusinessStationMoveDetailDataSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
console.log("---->" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsDetailList = res.data.data;
|
||||
this.GoodsStationMoveBillID = aResultData[0].BillMasterID;
|
||||
this.GoodsStationMoveBillNo = aResultData[0].BillNo;
|
||||
this.GoodsStationMoveBillDate = aResultData[0].BillDate;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.StoreNameID= aResultData[0].StoreNameID;
|
||||
this.ScanStoreStationName = aResultData[0].ScanStoreStationName;
|
||||
this.CommitType = aResultData[0].CommitType;
|
||||
this.CommitProcName = aResultData[0].CommitProcName;
|
||||
this.BillSumRoll = 0;
|
||||
this.BillSumRoll = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.BillSumRoll = this.BillSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.BillSumQty = this.BillSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.BillSumRoll = this.BillSumRoll.toFixed(2);
|
||||
this.BillSumQty = this.BillSumQty.toFixed(2);
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDetailList = [];
|
||||
} else {
|
||||
this.GoodsDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 审核按钮方法
|
||||
commitBtnFun: function() {
|
||||
if (this.BillMasterID <= 0) {
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前单据未提交,不能审核或消审!';
|
||||
return;
|
||||
}
|
||||
|
||||
var aCommitRecallName = '审核';
|
||||
if (this.CommitType == ''){
|
||||
aCommitRecallName = '审核';
|
||||
} else {
|
||||
aCommitRecallName = '消审';
|
||||
}
|
||||
|
||||
if (this.CommitProcName == ''){
|
||||
this.playError();
|
||||
this.BillDataMessage = '当前'+ aCommitRecallName +'操作配置有误,不能审核!';
|
||||
return;
|
||||
}
|
||||
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: this.CommitProcName,
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.GoodsStationMoveBillID
|
||||
}, {
|
||||
name: '@BillNo',
|
||||
value: this.GoodsStationMoveBillNo
|
||||
}, {
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage == 'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.BillDataMessage = aCommitRecallName + "成功!";
|
||||
|
||||
if (aCommitRecallName == '审核'){
|
||||
this.CommitType = '已审核'
|
||||
} else {
|
||||
this.CommitType = ''
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错!' + aResultData.BillDataMessage;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = aCommitRecallName + '出错,' + res.data.msg
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,716 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<view @click="pickerSelectFun('仓库名称')" class="flex-white-plr26 ptb20 bdb_f5 first">
|
||||
<text class="mr26">仓库名称<text class="redXingh">*</text></text>
|
||||
<view :class="StoreName ? '' : 'cBlack'"> {{StoreName ? StoreName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-form-item label-width="150" label="调出仓位:"
|
||||
:class="{'input-highlight': shouldHighlightFrom}"
|
||||
>
|
||||
<input type="text"
|
||||
v-model="FromStoreStationNo"
|
||||
maxlength="-1"
|
||||
style="width:100px;"
|
||||
@confirm="GetFromStoreStationName" />
|
||||
<text style="width:100px;">{{FromStoreStationName}}</text>
|
||||
<checkbox-group @change="AllCrockNoCheckChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllCrockNoScanStatus">整缸</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="调至仓位:"
|
||||
:class="{'input-highlight': shouldHighlightTo}"
|
||||
|
||||
>
|
||||
<input type="text"
|
||||
v-model="ToStoreStationNo"
|
||||
maxlength="-1"
|
||||
style="width:100px;"
|
||||
@confirm="GetToStoreStationName" />
|
||||
<text style="width:100px;">{{ToStoreStationName}}</text>
|
||||
<checkbox-group @change="AllStoreStationChange">
|
||||
<checkbox ref="checkBoxRef" :checked="AllStoreStationScanStatus">整架</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:"
|
||||
:class="{'input-highlight': shouldHighlightQR}"
|
||||
|
||||
>
|
||||
<input type="text"
|
||||
v-model="QRBarCode"
|
||||
maxlength="-1"
|
||||
style="width:150px;"
|
||||
@confirm="GoodsStoreStationMoveScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品编号:{{FabricGoodsNo}}</text>
|
||||
<text class="title" style="width:200px;">成品重量:{{GoodsQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品色号:{{GoodsCodeNo}}</text>
|
||||
<text class="title" style="width:200px;">成品颜色:{{GoodsCodeName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品缸号:{{CrockNo}}</text>
|
||||
<text class="title" style="width:200px;">缸号卷号:{{GoodsBillNo}}</text>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本架条数:{{StoreStationSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本架数量:{{StoreStationSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本色条数:{{GoodsCodeSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本色数量:{{GoodsCodeSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸条数:{{CrockNoSumRoll}}条</text>
|
||||
<text class="title" style="width:200px;">本缸数量:{{CrockNoSumQty}}KG</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDetailList"/>
|
||||
</view>
|
||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
selectType: '',
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
AllCrockNoScanStatus: false,
|
||||
AllStoreStationScanStatus: false,
|
||||
FromStoreStationID: 0,
|
||||
FromStoreStationNo: '',
|
||||
FromStoreStationName: '',
|
||||
ToStoreStationID: 0,
|
||||
ToStoreStationNo: '',
|
||||
ToStoreStationName: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
FabricGoodsNo: '',
|
||||
FabricGoodsName: '',
|
||||
GoodsCodeNo: '',
|
||||
GoodsCodeName: '',
|
||||
CrockNo: '',
|
||||
GoodsBillNo: '',
|
||||
GoodsQty: 0,
|
||||
FromStoreStationFocus: false,
|
||||
QRBarCodeFocus: false,
|
||||
ToStoreStationFocus: true,
|
||||
StoreStationSumRoll: 0,
|
||||
StoreStationSumQty: 0,
|
||||
GoodsCodeSumRoll: 0,
|
||||
GoodsCodeSumQty: 0,
|
||||
CrockNoSumRoll: 0,
|
||||
CrockNoSumQty: 0,
|
||||
StoreNameDataList: [],
|
||||
GoodsDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '成品编号',
|
||||
key: 'product_code'
|
||||
}, {
|
||||
label: '成品名称',
|
||||
key: 'product_name'
|
||||
},{
|
||||
label: '成品色号',
|
||||
key: 'product_color_code'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'product_color_name'
|
||||
}, {
|
||||
label: '成品缸号',
|
||||
key: 'dyelot_number'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'roll'
|
||||
}, {
|
||||
label: '数量',
|
||||
key: 'weight'
|
||||
}],
|
||||
scanReceiver: null,
|
||||
isPageActive: false, // 添加页面活动状态标志
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
setTimeout(() => {
|
||||
this.getStoreNameData();
|
||||
}, 500);
|
||||
|
||||
if (getApp().globalData.StoreTypeNo.toUpperCase() == 'STOREFABRICGOODS') {
|
||||
this.StoreNameID = getApp().globalData.StoreNameID;
|
||||
this.StoreName = getApp().globalData.StoreName;
|
||||
};
|
||||
// #ifdef APP-PLUS
|
||||
this.isPageActive = true;
|
||||
this.registerScanBroadcast();
|
||||
// #endif
|
||||
/* uni.$on('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$on('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$on('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$on('shangjiBindFun', that.shangjiBindFun) */
|
||||
},
|
||||
onUnload() {
|
||||
// #ifdef APP-PLUS
|
||||
this.isPageActive = false;
|
||||
// this.unregisterBroadcast();
|
||||
// #endif
|
||||
},
|
||||
|
||||
onHide() {
|
||||
// 页面隐藏时
|
||||
this.isPageActive = false;
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 页面显示时
|
||||
this.isPageActive = true;
|
||||
},
|
||||
/* onBackPress() {
|
||||
uni.$off('bjdKehuBindFun', that.bjdKehuBindFun)
|
||||
uni.$off('chanpinBindFun', that.chanpinBindFun)
|
||||
uni.$off('bjdLxrBindFun', that.bjdLxrBindFun)
|
||||
uni.$off('shangjiBindFun', that.shangjiBindFun)
|
||||
}, */
|
||||
computed: {
|
||||
shouldHighlightFrom() {
|
||||
return !this.FromStoreStationNo;
|
||||
},
|
||||
shouldHighlightTo() {
|
||||
return this.FromStoreStationNo && !this.ToStoreStationNo;
|
||||
},
|
||||
shouldHighlightQR() {
|
||||
return this.FromStoreStationNo && this.ToStoreStationNo && !this.QRBarCode;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
AllCrockNoCheckChange:function () {
|
||||
this.AllCrockNoScanStatus = !this.AllCrockNoScanStatus;
|
||||
this.AllStoreStationScanStatus = false;
|
||||
},
|
||||
|
||||
AllStoreStationChange:function () {
|
||||
this.AllStoreStationScanStatus = !this.AllStoreStationScanStatus;
|
||||
this.AllCrockNoScanStatus = false;
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
pickerSelectFun: function(str) {
|
||||
that.selectList = [];
|
||||
if (str == '仓库名称') {
|
||||
that.selectList = this.StoreNameDataList;
|
||||
}
|
||||
|
||||
that.selectShow = true;
|
||||
that.selectType = str;
|
||||
},
|
||||
|
||||
scanFun: function() {
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
that.code = res.result;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 选择框选中事件
|
||||
selectConfirmFun: function(e) {
|
||||
if (that.selectType == '仓库名称') {
|
||||
that.StoreNameID = e[0].value;
|
||||
that.StoreName = e[0].label;
|
||||
}
|
||||
|
||||
/* console.log(JSON.stringify(that.selectList)); */
|
||||
that.selectShow = true;
|
||||
/* that.selectType = str; */
|
||||
},
|
||||
|
||||
// 注册扫码广播接收器
|
||||
registerScanBroadcast() {
|
||||
try {
|
||||
const main = plus.android.runtimeMainActivity();
|
||||
|
||||
// 先配置扫码枪广播设置
|
||||
try {
|
||||
const Intent = plus.android.importClass("android.content.Intent");
|
||||
const intent = new Intent("com.android.scanner.service_settings");
|
||||
intent.putExtra(
|
||||
"action_barcode_broadcast",
|
||||
"com.android.server.scannerservice.broadcast"
|
||||
);
|
||||
intent.putExtra("key_barcode_broadcast", "scannerdata");
|
||||
main.sendBroadcast(intent);
|
||||
} catch (error) {
|
||||
console.error("配置扫码枪广播失败:", error);
|
||||
}
|
||||
|
||||
// 注册广播接收器
|
||||
const IntentFilter = plus.android.importClass(
|
||||
"android.content.IntentFilter"
|
||||
);
|
||||
const filter = new IntentFilter();
|
||||
filter.addAction("com.android.server.scannerservice.broadcast");
|
||||
console.log("添加广播action完成");
|
||||
|
||||
const receiver = plus.android.implements(
|
||||
"io.dcloud.feature.internal.reflect.BroadcastReceiver",
|
||||
{
|
||||
onReceive: (context, intent) => {
|
||||
// 只有当页面活动时才处理广播
|
||||
if (!this.isPageActive) return;
|
||||
|
||||
try {
|
||||
console.log("Newland intent:", intent);
|
||||
const scanResult = intent.getStringExtra("scannerdata");
|
||||
console.log("配布单详情-扫码结果:", scanResult);
|
||||
if(!this.StoreName){
|
||||
this.showError("请先选择仓库名称");
|
||||
return
|
||||
}
|
||||
if (scanResult) {
|
||||
if(!this.FromStoreStationNo){
|
||||
this.FromStoreStationNo = scanResult
|
||||
this.$nextTick(() => {
|
||||
this.GetFromStoreStationName();
|
||||
});
|
||||
return
|
||||
}else if(!this.ToStoreStationNo){
|
||||
this.ToStoreStationNo = scanResult;
|
||||
this.$nextTick(() => {
|
||||
this.GetToStoreStationName();
|
||||
});
|
||||
return
|
||||
|
||||
}else if(!this.QRBarCode) {
|
||||
this.QRBarCode = scanResult;
|
||||
this.$nextTick(() => {
|
||||
this.GoodsStoreStationMoveScan();
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.showError("处理扫码数据时出错");
|
||||
console.error("处理广播数据时出错:", error, error.stack);
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
// 注册广播接收器
|
||||
main.registerReceiver(receiver, filter);
|
||||
this.scanReceiver = receiver;
|
||||
console.log("扫码广播注册成功,等待扫码...");
|
||||
} catch (error) {
|
||||
console.error("注册扫码广播失败:", error);
|
||||
console.error("错误详情:", error.message);
|
||||
console.error("错误堆栈:", error.stack);
|
||||
}
|
||||
},
|
||||
|
||||
// 注销扫码广播接收器
|
||||
unregisterScanBroadcast() {
|
||||
if (this.scanReceiver) {
|
||||
try {
|
||||
const main = plus.android.runtimeMainActivity();
|
||||
main.unregisterReceiver(this.scanReceiver);
|
||||
this.scanReceiver = null;
|
||||
console.log("扫码广播注销成功");
|
||||
} catch (error) {
|
||||
console.error("注销扫码广播失败:", error);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加一个通用的错误提示方法
|
||||
showError(message) {
|
||||
this.playError();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: message,
|
||||
showCancel: false
|
||||
});
|
||||
},
|
||||
getStoreNameData() {
|
||||
util.request({
|
||||
url: '/warehouse/physicalWarehouse/getPhysicalWarehouseDropdownList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'warehouse_type_id': 103,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("getStoreNameData" + res);
|
||||
if (res.data.code == '0' && res.data.msg == 'success'){
|
||||
var aResultData = res.data.data.list;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.StoreNameDataList.push({
|
||||
value: aResultData[i].id,
|
||||
label: aResultData[i].name
|
||||
})
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.StoreNameDataList = []
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetFromStoreStationName: function() {
|
||||
console.log("<<<>>>>>" + this.FromStoreStationNo + '<<<<>>>>');
|
||||
util.request({
|
||||
url: '/warehouse/warehouseBin/getWarehouseBin',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'qr_code': this.FromStoreStationNo,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('GetFromStoreStationName',res)
|
||||
if (res.data.msg == 'success'){
|
||||
if(res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
||||
this.showError('该仓位不属于当前仓库')
|
||||
return
|
||||
}
|
||||
this.FromStoreStationID = res.data.data.id;
|
||||
this.FromStoreStationNo = res.data.data.code;
|
||||
this.FromStoreStationName = res.data.data.name;
|
||||
}
|
||||
|
||||
this.ToStoreStationFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.ToStoreStationFocus = true;
|
||||
});
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetToStoreStationName: function() {
|
||||
console.log("<<<>>>>>" + this.ToStoreStationNo + '<<<<>>>>');
|
||||
util.request({
|
||||
url: '/warehouse/warehouseBin/getWarehouseBin',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'qr_code': this.ToStoreStationNo,
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.msg == 'success'){
|
||||
if(res.data.data.physical_warehouse_id !== this.StoreNameID) {
|
||||
this.showError('该仓位不属于当前仓库')
|
||||
return
|
||||
}
|
||||
this.ToStoreStationID = res.data.data.id;
|
||||
this.ToStoreStationNo = res.data.data.code;
|
||||
this.ToStoreStationName = res.data.data.name;
|
||||
}
|
||||
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
},
|
||||
fail: (error) => {
|
||||
this.showError('连接服务器出错,请检查后台服务是否启动!' + error.errMsg);
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStoreStationMoveScan() {
|
||||
if (this.StoreNameID == 0) {
|
||||
this.showError('请先选择仓库名称');
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.ToStoreStationName == '') {
|
||||
this.showError('请先输入调至仓库');
|
||||
return;
|
||||
}
|
||||
|
||||
let aAllStoreStationScanStatus = 0;
|
||||
if (this.AllStoreStationScanStatus){
|
||||
aAllStoreStationScanStatus = '1';
|
||||
};
|
||||
|
||||
let aAllCrockNoScanStatus = 0;
|
||||
if (this.AllCrockNoScanStatus){
|
||||
aAllCrockNoScanStatus = '1';
|
||||
};
|
||||
|
||||
if (this.AllStoreStationScanStatus && this.FromStoreStationName == ''){
|
||||
this.showError('选择整架调仓位,必须要先输入调出仓位');
|
||||
return;
|
||||
};
|
||||
|
||||
if (this.aAllCrockNoScanStatus && this.FromStoreStationName == ''){
|
||||
this.showError('选择整缸调仓位,必须要先输入调出仓位');
|
||||
return;
|
||||
};
|
||||
|
||||
let aTypeID = 1;
|
||||
if (this.aAllCrockNoScanStatus){
|
||||
aTypeID = 2
|
||||
} else if (this.AllStoreStationScanStatus){
|
||||
aTypeID = 3
|
||||
}
|
||||
|
||||
var aQRBarCode = '';
|
||||
var aBarCode = '';
|
||||
if (this.QRBarCode.startsWith('66^')>0){
|
||||
aQRBarCode = this.QRBarCode
|
||||
}else {
|
||||
aBarCode = this.QRBarCode;
|
||||
}
|
||||
|
||||
if (aQRBarCode == ''){
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
this.showError('请扫描二维码');
|
||||
return;
|
||||
}
|
||||
|
||||
util.request({
|
||||
url: '/product/stockProduct/move',
|
||||
method: 'POST',
|
||||
data: {
|
||||
'qr_code': aQRBarCode,
|
||||
'source_bin_id': this.FromStoreStationID,
|
||||
'target_bin_id': this.ToStoreStationID,
|
||||
'type': aTypeID,
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("-->>--" + JSON.stringify(res.data.data));
|
||||
if (res.data.code == '0'){
|
||||
let aResultData = res.data.data;
|
||||
this.FabricGoodsNo = aResultData.product_code;
|
||||
this.FabricGoodsName = aResultData.product_name;
|
||||
this.GoodsCodeNo = aResultData.product_color_code;
|
||||
this.GoodsCodeName = aResultData.product_color_name;
|
||||
this.CrockNo = aResultData.dyelot_number;
|
||||
this.GoodsBillNo = aResultData.volume_number;
|
||||
this.GoodsQty = aResultData.weight / 10000;
|
||||
this.StoreStationSumRoll = aResultData.warehouse_bin_roll/100;
|
||||
this.StoreStationSumQty = aResultData.warehouse_bin_weight/10000;
|
||||
this.GoodsCodeSumRoll = aResultData.color_roll/100;
|
||||
this.GoodsCodeSumQty = aResultData.color_weight/10000;
|
||||
this.CrockNoSumRoll = aResultData.dye_roll/100;
|
||||
this.CrockNoSumQty = aResultData.dye_weight/10000;
|
||||
|
||||
this.playSuccess();
|
||||
this.GoodsStoreStationMoveData();
|
||||
this.BillDataMessage = res.data.msg;
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.playError();
|
||||
this.BillDataMessage = res.data.msg;
|
||||
this.QRBarCode = '';
|
||||
this.QRBarCodeFocus = false;
|
||||
this.$nextTick(() => {
|
||||
this.QRBarCodeFocus = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GoodsStoreStationMoveData: function() {
|
||||
util.request({
|
||||
url: '/product/stockProduct/getStockProductDyelotNumberList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
'warehouse_bin_id': this.ToStoreStationID,
|
||||
},
|
||||
success: (res) => {
|
||||
/* console.log("-->>--" + JSON.stringify(res.data.data)); */
|
||||
this.GoodsDetailList = [];
|
||||
var aResultData = res.data.data.list;
|
||||
this.StoreStationSumRoll = 0;
|
||||
this.StoreStationSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
console.log("---aResultData[i].weight>>" + aResultData[i].weight);
|
||||
aResultData[i].roll = aResultData[i].roll / 100;
|
||||
aResultData[i].weight = aResultData[i].weight / 10000;
|
||||
|
||||
this.StoreStationSumRoll = this.StoreStationSumRoll + aResultData[i].roll;
|
||||
this.StoreStationSumQty = this.StoreStationSumQty + aResultData[i].weight;
|
||||
};
|
||||
|
||||
this.GoodsDetailList = aResultData;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.first{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wrap{
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.input-highlight {
|
||||
border: 1px solid #ff0000 !important;
|
||||
}
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,300 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-sticky>
|
||||
<div style="height: 43px; border-bottom: 1rpx solid #eeeeee; background-color: #FFFFFF;">
|
||||
<u-tabs :list="tabList" name="title" active-color="red" :is-scroll="false"
|
||||
@change="onTabChange"></u-tabs>
|
||||
</div>
|
||||
</u-sticky>
|
||||
|
||||
<view class="u-demo-block">
|
||||
<view class="u-page__tag-item">
|
||||
<u-search v-model="searchProductWeaveNo" :show-action="false" @custom="selectProductWeaveData"
|
||||
@search="selectProductWeaveData" placeholder="请输入排产单号或织厂名称"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<dataNull v-if="list.length == 0" src="/static/img/chahua/gjNull.png" title="暂无相关排产单" title1="请添加或者更换搜索添加">
|
||||
</dataNull>
|
||||
<scroll-view v-else scroll-y="true" :style="{height: scrollHeight}" @scrolltolower="selectDataFun"
|
||||
refresher-enabled :refresher-threshold="200" :refresher-triggered="triggered" refresher-background="gray"
|
||||
@refresherrefresh="onRefresh" @refresherrestore="onRestore">
|
||||
<view v-for="(item, index) in list" :key="index" @click="cardClickFun(item, index)">
|
||||
<productweaveview :item="item" :isSelect="isSelect" :index="index"></productweaveview>
|
||||
</view>
|
||||
<getMore :isMore="isMore"></getMore>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
//import {tyDropDown,dropDownByUser,bjdDatePxData,bjdSxDropDownData} from '../../static/utils/dropdown.js'
|
||||
//import {getDayFun,getDayByNumFun} from '@/static/utils/date.js'
|
||||
import dataNull from '@/components/dataNull/dataNull.vue'
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import productweaveview from '@/pages/productorder/productweaveview.vue'
|
||||
import getMore from '@/components/getMore/getMore.vue'
|
||||
import topDropdown from '../../components/topDropdown/topDropdown.vue'
|
||||
import util, {playSuccessAudio,playErrorAudio} from '../../common/util';
|
||||
import {TbOrderCouponService} from "@/dev/services/tb-order-coupon.service";
|
||||
export default {
|
||||
components: {
|
||||
dataNull,
|
||||
addBtn,
|
||||
getMore,
|
||||
productweaveview,
|
||||
topDropdown
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '现货', status: null},
|
||||
{title: '版单', status: '1'},
|
||||
{title: '全部', status: '2'},
|
||||
],
|
||||
searchProductWeaveNo: '',
|
||||
activeTabIndex: 0,
|
||||
sxList: [],
|
||||
list: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
pageType: '',
|
||||
sortObj: {
|
||||
update_date: -1
|
||||
},
|
||||
optionsReq: {}, // 第一个下拉框请求参数
|
||||
dateReq: [], // 日期相关请求参数
|
||||
sxReq: JSON.stringify({}), // 筛选想请求参数
|
||||
matchObj: {},
|
||||
searchValue: '',
|
||||
clientIdArr: [],
|
||||
tabNoEqualArr: [], //标签页不等于数据
|
||||
depId: undefined
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
let obj = {};
|
||||
|
||||
if (e.clientId) {
|
||||
that.clientIdArr = [e.clientId]
|
||||
}
|
||||
that.matchObj = obj;
|
||||
that.optionsReq = JSON.stringify(obj);
|
||||
that.pageType = e.type ? e.type : '';
|
||||
if (e.type) {
|
||||
that.isSelect = true;
|
||||
}
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
if (e.next_gjDate) {
|
||||
let dateArr = getDayByNumFun(e.next_gjDate);
|
||||
let dateObj = {
|
||||
field: 'next_gjDate',
|
||||
sTime: dateArr[1],
|
||||
eTime: dateArr[0]
|
||||
};
|
||||
let arr = that.sxList;
|
||||
//arr[0].current = 0;
|
||||
that.sxList = arr;
|
||||
that.dateReq.push(dateObj)
|
||||
} else {
|
||||
let arr = that.sxList;
|
||||
//arr[0].current = '';
|
||||
that.sxList = arr;
|
||||
}
|
||||
that.selectDataFun();
|
||||
//uni.$on('deleteCardFun', that.deleteCardFun);
|
||||
//uni.$on('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
//uni.$on('addBjdItemInListFun', that.addBjdItemInListFun)
|
||||
},
|
||||
watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
//console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
that.selectDataFun(newVal);
|
||||
//this.doRefresh(this.tbOrderCouponList)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上拉加载
|
||||
onReachBottom: function () {
|
||||
/*
|
||||
if (this.pagination.hasNextPage) {
|
||||
this.doInfinite()
|
||||
}
|
||||
*/
|
||||
},
|
||||
onBackPress() {
|
||||
uni.$off('deleteCardFun', that.deleteCardFun);
|
||||
uni.$off('updateBjdListByIndex', that.updateBjdListByIndex)
|
||||
uni.$off('addBjdItemInListFun', that.addBjdItemInListFun);
|
||||
},
|
||||
methods: {
|
||||
onTabChange(index) {
|
||||
const _self = this;
|
||||
this.activeTabIndex = index;
|
||||
//this.urlParams.activeTabIndex = this.activeTabIndex;
|
||||
},
|
||||
|
||||
selectProductWeaveData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetProductWeaveSQL',
|
||||
params: [{
|
||||
name: 'WFID',
|
||||
value: 0
|
||||
}, {
|
||||
name: 'MWFID',
|
||||
value: 0
|
||||
}, {
|
||||
name: 'ProductWeaveNo',
|
||||
value: '%' + this.searchProductWeaveNo + '%'
|
||||
}, {
|
||||
name: 'WeaveFactoryName',
|
||||
value: '%' + this.searchProductWeaveNo + '%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
if (that.pageIndex == 1) {
|
||||
that.list = [];
|
||||
}
|
||||
if (res.data == 20) {
|
||||
that.pageIndex += 1;
|
||||
that.isMore = true;
|
||||
} else {
|
||||
that.isMore = false;
|
||||
}
|
||||
that.list = that.list.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 加载更多数据中
|
||||
* @param infiniteScroll
|
||||
*/
|
||||
doInfinite(infiniteScroll) {
|
||||
const _self = this;
|
||||
new TbOrderCouponService().findTableTbOrderCouponList({
|
||||
pagination: _self.pagination,
|
||||
data: {
|
||||
communityId: _self.globalVariable.userInfo.tbCommunity.id,
|
||||
userId: _self.globalVariable.userInfo.id,
|
||||
status: _self.tabList[_self.activeTabIndex].status,
|
||||
orderBy: 'create_time desc',
|
||||
},
|
||||
}).then(result => {
|
||||
_self.pagination.refreshPage(result);
|
||||
_self.tbOrderCouponList = [..._self.tbOrderCouponList, ...result.list];
|
||||
});
|
||||
},
|
||||
|
||||
// 查询报价单
|
||||
selectDataFun: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetProductWeaveSQL',
|
||||
params: [{
|
||||
name: 'WFID',
|
||||
value: 0
|
||||
}, {
|
||||
name: 'MWFID',
|
||||
value: 0
|
||||
}, {
|
||||
name: 'ProductWeaveNo',
|
||||
value: '%' + this.searchProductWeaveNo + '%'
|
||||
}, {
|
||||
name: 'WeaveFactoryName',
|
||||
value: '%' + this.searchProductWeaveNo + '%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
if (that.pageIndex == 1) {
|
||||
that.list = [];
|
||||
}
|
||||
if (res.data == 20) {
|
||||
that.pageIndex += 1;
|
||||
that.isMore = true;
|
||||
} else {
|
||||
that.isMore = false;
|
||||
}
|
||||
that.list = that.list.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/productorder/productweaveDetail?'
|
||||
+'billmid=' + item.ProductWeaveMasterID
|
||||
+'&billdid=' + item.ProductWeaveDetailID
|
||||
})
|
||||
},
|
||||
|
||||
// 搜索框回调方法
|
||||
searchBoxEmitFun: function(e) {
|
||||
that.searchValue = e.searchValue1;
|
||||
that.cxGetDataFun()
|
||||
},
|
||||
// 下拉刷新
|
||||
onRefresh: function() {
|
||||
if (that.triggered) return
|
||||
that.triggered = true;
|
||||
that.cxGetDataFun();
|
||||
},
|
||||
onRestore: function(e) {
|
||||
that.triggered = false; // 需要重置
|
||||
},
|
||||
// 重新获取数据
|
||||
cxGetDataFun: function() {
|
||||
that.pageIndex = 1;
|
||||
that.isMore = true;
|
||||
that.selectDataFun();
|
||||
},
|
||||
deleteCardFun: function(e) {
|
||||
let arr = that.list;
|
||||
arr.splice(e.index, 1);
|
||||
that.list = arr;
|
||||
},
|
||||
// add页面新增数据
|
||||
addBjdItemInListFun: function(e) {
|
||||
that.cxGetDataFun()
|
||||
},
|
||||
// 通过下标更新list数据
|
||||
updateBjdListByIndex: function(e) {
|
||||
that.$set(that.list, parseInt(e.index), e.obj)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,586 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">排产单号:{{ProductWeaveNo}}</text>
|
||||
<text class="title" style="width:200px;">排产日期:{{$u.timeFormat(ProductWeaveDate, 'yyyy-mm-dd')}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">织厂名称:{{WeaveFactoryName}}</text>
|
||||
<text class="title" style="width:200px;">商品编码:{{FabricEmbryoCodeNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">坯布名称:{{FabricEmbryoName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">坯布颜色:{{EmbryoCodeName}}</text>
|
||||
<text class="title" style="width:200px;">日产条数:{{WeaveMachineDayYieldQty}}条</text>
|
||||
</u-form-item>
|
||||
<view @click="pickerSelectFun('进度状态')" class="flex-white-plr26 ptb20 bdb_f5">
|
||||
<text>进度状态</text>
|
||||
<view class="bluecolor" :class="WeaveCompleteTypeName ? '' : 'cBlack'">
|
||||
{{WeaveCompleteTypeName ? WeaveCompleteTypeName : '请选择'}}
|
||||
<u-icon class="ml26" name="arrow-right" size="40" color="#888888"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">生产情况:</text>
|
||||
<u-input v-model="WeaveFactoryWeaveRemark" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">安排机台:</text>
|
||||
<u-input v-model="WeaveFactoryMachineNos" type="number" placeholder="请输入数字"
|
||||
@input="TypeInputWeaveFactoryMachineNos($event)" /></text>
|
||||
<text class="title" style="width:80px;">染纱货期:</text>
|
||||
<u-input v-model="DyeWorksDyeYarnTermDate" /></text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">派纱时间:</text>
|
||||
<u-input v-model="WeaveFactorySendYarn" />
|
||||
<text class="title" style="width:80px;">上机时间:</text>
|
||||
<u-input v-model="WeaveFactoryMachineBeginDate" /></text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">派纱备注:</text>
|
||||
<u-input v-model="WeaveFactorySendRemark" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">当前跟前天累计条数:{{TowDayInRoll}}条</text>
|
||||
<text class="title" style="width:200px;">当天收布条数:{{ToDayInRoll}}条</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">累计条数:{{SumInRoll}}条</text>
|
||||
<text class="title" style="width:80px;">未织条数:</text>
|
||||
<u-input v-model="NotProductWeaveRoll" type="number" placeholder="请输入数字"
|
||||
@input="TypeInputNotProductWeaveRoll($event)" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">欠胚数量:{{NotProductRoll}}条</text>
|
||||
<text class="title" style="width:80px;">织厂存胚:</text>
|
||||
<u-input v-model="WeaveFactoryStoreRoll" type="number" placeholder="请输入数字"
|
||||
@input="TypeInputNotWeaveFactoryStoreRoll($event)" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:100px;">回复交货时间:</text>
|
||||
<u-input v-model="WeaveFactoryReplyTermDate" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:100px;">更改货期原因:</text>
|
||||
<u-input v-model="WeaveFactoryReplyRemark" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">成品间距:{{GoodsWeaveSpaceNames}}</text>
|
||||
<text class="title" style="width:200px;">针 寸 数:{{NeedleInch}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:400px;">织厂地址:{{WeaveFactoryContactAddress}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">联 系 人:{{WeaveFactoryContactName}}</text>
|
||||
<text class="title" style="width:200px;">织厂电话:{{WeaveFactoryContactPhone}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">排产条数:{{WeaveRoll}}</text>
|
||||
<text class="title" style="width:200px;">排产重量:{{WeaveQty}}</text>
|
||||
</u-form-item>
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" class="submitBtn" :ripple="true" ripple-bg-color="#909399"
|
||||
@click="submitBtnFun"> {{pageType ? '保存' : '提交'}}
|
||||
</u-button>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnDetailList" />
|
||||
</view>
|
||||
|
||||
<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
let that = '';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
BillMasterID: 0,
|
||||
BillDetailID: 0,
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
actionSheetShow: false,
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
selectType: '',
|
||||
pageType: '',
|
||||
ProductWeaveNo: '',
|
||||
ProductWeaveDate: '',
|
||||
WeaveFacctoryID: 0,
|
||||
WeaveFactoryName: '',
|
||||
WeaveFactoryContactAddress: '',
|
||||
WeaveFactoryContactName: '',
|
||||
WeaveFactoryContactPhone: '',
|
||||
FabricEmbryoNo: '',
|
||||
FabricEmbryoName: '',
|
||||
EmbryoCodeNo: '',
|
||||
EmbryoCodeName: '',
|
||||
FabricEmbryoCodeNo: '',
|
||||
GoodsWeaveSpaceNames: '',
|
||||
WeaveCompleteTypeID: 0,
|
||||
WeaveCompleteTypeName: '',
|
||||
NeedleInch: '',
|
||||
WeaveRoll: 0,
|
||||
WeaveQty: 0,
|
||||
WeaveMachineDayYieldQty: 0,
|
||||
WeaveFactoryMachineNos: '',
|
||||
WeaveFactoryWeaveRemark: '',
|
||||
WeaveFactorySendYarn: '',
|
||||
WeaveFactorySendRemark: '',
|
||||
WeaveFactoryMachineBeginDate: '',
|
||||
DyeWorksDyeYarnTermDate: '',
|
||||
WeaveFactoryReplyTermDate: '',
|
||||
WeaveFactoryReplyRemark: '',
|
||||
TowDayInRoll: 0,
|
||||
ToDayInRoll: 0,
|
||||
SumInRoll: 0,
|
||||
NotProductWeaveRoll: '',
|
||||
NotProductRoll: 0,
|
||||
WeaveFactoryStoreRoll: '',
|
||||
YarnDetailList: [],
|
||||
BaseDataList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料编号',
|
||||
key: 'YarnNo'
|
||||
}, {
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料比例(%)',
|
||||
key: 'YarnRate'
|
||||
}, {
|
||||
label: '原料损耗(%)',
|
||||
key: 'YarnLost'
|
||||
}, {
|
||||
label: '用纱量',
|
||||
key: 'YarnUseQty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billmid) {
|
||||
that.BillMasterID = e.billmid;
|
||||
that.BillDetailID = e.billdid;
|
||||
}
|
||||
that.ProductWeaveDetail();
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
that.getBaseDataList();
|
||||
}, 1000);
|
||||
|
||||
console.log("---BillID->" + this.BillMasterID + '--BillDetailID->' + this.BillDetailID);
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
TypeInputNotProductWeaveRoll(e, val) {
|
||||
// 只能输入数字的验证;
|
||||
const inputType = /[^\d]/g //想限制什么类型在这里换换正则就可以了
|
||||
this.$nextTick(function() {
|
||||
this.NotProductWeaveRoll = e.replace(inputRule, '');
|
||||
})
|
||||
},
|
||||
|
||||
TypeInputNotWeaveFactoryStoreRoll(e, val) {
|
||||
// 只能输入数字的验证;
|
||||
const inputType = /[^\d]/g //想限制什么类型在这里换换正则就可以了
|
||||
this.$nextTick(function() {
|
||||
this.WeaveFactoryStoreRoll = e.replace(inputRule, '');
|
||||
})
|
||||
},
|
||||
|
||||
TypeInputWeaveFactoryMachineNos(e, val) {
|
||||
// 只能输入数字的验证;
|
||||
const inputType = /[^\d]/g //想限制什么类型在这里换换正则就可以了
|
||||
this.$nextTick(function() {
|
||||
this.WeaveFactoryStoreRoll = e.replace(inputRule, '');
|
||||
})
|
||||
},
|
||||
|
||||
getBaseDataList() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.BaseData.GetBaseDataList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: 'ProductWeave.WeaveCompleteTypeName'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.BaseDataList.push({
|
||||
value: aResultData[i].BaseDataID,
|
||||
label: aResultData[i].BaseDataName
|
||||
})
|
||||
}
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.BaseDataList = [];
|
||||
} else {
|
||||
this.BaseDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 提交按钮方法
|
||||
submitBtnFun: function() {
|
||||
console.log("------->>>" + this.BillDetailID);
|
||||
if (this.BillDetailID == 0) {
|
||||
//this.playError();
|
||||
this.BillDataMessage = '当前单号为空,不能提交!';
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_ProductWeaveTrackData',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.BillMasterID
|
||||
},
|
||||
{
|
||||
name: '@BillDetailID',
|
||||
value: this.BillDetailID
|
||||
},
|
||||
{
|
||||
name: '@WeaveCompleteTypeName',
|
||||
value: this.WeaveCompleteTypeName
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactoryMachineNos',
|
||||
value: this.WeaveFactoryMachineNos
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactoryWeaveRemark',
|
||||
value: this.WeaveFactoryWeaveRemark
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactorySendYarn',
|
||||
value: this.WeaveFactorySendYarn
|
||||
}, {
|
||||
name: '@WeaveFactorySendRemark',
|
||||
value: this.WeaveFactorySendRemark
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactoryMachineBeginDate',
|
||||
value: this.WeaveFactoryMachineBeginDate
|
||||
},
|
||||
{
|
||||
name: '@DyeWorksDyeYarnTermDate',
|
||||
value: this.DyeWorksDyeYarnTermDate
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactoryReplyTermDate',
|
||||
value: this.WeaveFactoryReplyTermDate
|
||||
}, {
|
||||
name: '@WeaveFactoryReplyRemark',
|
||||
value: this.WeaveFactoryReplyRemark
|
||||
},
|
||||
{
|
||||
name: '@NotProductWeaveRoll',
|
||||
value: this.NotProductWeaveRoll
|
||||
},
|
||||
{
|
||||
name: '@WeaveFactoryStoreRoll',
|
||||
value: this.WeaveFactoryStoreRoll
|
||||
},
|
||||
{
|
||||
name: '@UserName',
|
||||
value: getApp().globalData.UserName
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0) {
|
||||
var aResultData = JSON.parse(res.data.data);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '提交成功!'
|
||||
});
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '提交出错!' + aResultData.BillDataMessage
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '提交出错!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
//this.playError();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!'
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
pickerSelectFun: function(str) {
|
||||
that.selectList = [];
|
||||
if (str == '进度状态') {
|
||||
console.log("--<<<<<->>>" + str);
|
||||
that.selectList = this.BaseDataList;
|
||||
}
|
||||
|
||||
that.selectShow = true;
|
||||
that.selectType = str;
|
||||
},
|
||||
// 选择框选中事件
|
||||
selectConfirmFun: function(e) {
|
||||
if (that.selectType == '进度状态') {
|
||||
that.WeaveCompleteTypeID = e[0].value;
|
||||
that.WeaveCompleteTypeName = e[0].label;
|
||||
}
|
||||
},
|
||||
|
||||
ProductWeaveDetail: function() {
|
||||
if (this.BillMasterID == 0) {
|
||||
this.BillMasterID = 30685
|
||||
}
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetProductWeaveDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.BillMasterID
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
this.triggered = false;
|
||||
let data = res.data.data;
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.YarnDetailList = res.data.data;
|
||||
this.ProductWeaveNo = aResultData[0].ProductWeaveNo;
|
||||
this.ProductWeaveDate = aResultData[0].ProductWeaveDate;
|
||||
this.WeaveFactoryName = aResultData[0].WeaveFactoryName;
|
||||
this.WeaveCompleteTypeName = aResultData[0].WeaveCompleteTypeName;
|
||||
this.WeaveFactoryContactAddress = aResultData[0].WeaveFactoryContactAddress;
|
||||
this.WeaveFactoryContactName = aResultData[0].WeaveFactoryContactName;
|
||||
this.WeaveFactoryContactPhone = aResultData[0].WeaveFactoryContactPhone;
|
||||
this.FabricEmbryoCodeNo = aResultData[0].FabricEmbryoCodeNo;
|
||||
this.FabricEmbryoNo = aResultData[0].FabricEmbryoNo;
|
||||
this.FabricEmbryoName = aResultData[0].FabricEmbryoName;
|
||||
this.EmbryoCodeNo = aResultData[0].EmbryoCodeNo;
|
||||
this.EmbryoCodeName = aResultData[0].EmbryoCodeName;
|
||||
this.GoodsWeaveSpaceNames = aResultData[0].GoodsWeaveSpaceNames;
|
||||
this.NeedleInch = aResultData[0].NeedleInch;
|
||||
this.WeaveMachineDayYieldQty = aResultData[0].WeaveMachineDayYieldQty;
|
||||
this.WeaveFactoryMachineNos = aResultData[0].WeaveFactoryMachineNos;
|
||||
this.WeaveFactoryWeaveRemark = aResultData[0].WeaveFactoryWeaveRemark;
|
||||
this.WeaveFactorySendYarn = aResultData[0].WeaveFactorySendYarn;
|
||||
this.WeaveFactoryMachineBeginDate = aResultData[0]
|
||||
.WeaveFactoryMachineBeginDate;
|
||||
this.WeaveFactorySendRemark = aResultData[0].WeaveFactorySendRemark;
|
||||
this.WeaveFactoryMachineBeginDate = aResultData[0]
|
||||
.WeaveFactoryMachineBeginDate;
|
||||
this.DyeWorksDyeYarnTermDate = aResultData[0].DyeWorksDyeYarnTermDate;
|
||||
this.WeaveFactoryReplyTermDate = aResultData[0].WeaveFactoryReplyTermDate;
|
||||
this.WeaveFactoryReplyRemark = aResultData[0].WeaveFactoryReplyRemark;
|
||||
this.TowDayInRoll = aResultData[0].TowDayInRoll;
|
||||
this.ToDayInRoll = aResultData[0].ToDayInRoll;
|
||||
this.SumInRoll = aResultData[0].SumInRoll;
|
||||
this.NotProductWeaveRoll = aResultData[0].NotProductWeaveRoll;
|
||||
this.NotProductRoll = aResultData[0].NotProductRoll;
|
||||
this.WeaveFactoryStoreRoll = aResultData[0].WeaveFactoryStoreRoll;
|
||||
this.WeaveRoll = aResultData[0].WeaveRoll.toFixed(2) + '条';
|
||||
this.WeaveQty = aResultData[0].WeaveQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnDetailList = [];
|
||||
} else {
|
||||
this.YarnDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
padding-bottom: 260rpx;
|
||||
}
|
||||
|
||||
.u-radio {
|
||||
width: 200rpx !important;
|
||||
}
|
||||
|
||||
.submitView {
|
||||
width: 100%;
|
||||
padding: 16rpx 0 26rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-top: 1rpx solid #f1f1f1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 666rpx;
|
||||
}
|
||||
|
||||
.productBox {
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 32rpx;
|
||||
padding: 26rpx 0;
|
||||
}
|
||||
|
||||
.tjcpName {
|
||||
width: 686rpx;
|
||||
height: 40rpx;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-left: 6rpx solid #007AFF;
|
||||
padding-left: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.cpInput {
|
||||
width: 150rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.cpInput1 {
|
||||
width: 200rpx !important;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.cpInput1>input {
|
||||
box-sizing: border-box;
|
||||
border: 1rpx solid #DDDDDD;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.clearIcon {
|
||||
position: absolute;
|
||||
right: 6rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.greenPrice {
|
||||
font-size: 16px;
|
||||
color: #19BE6B !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.disFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.inputName {
|
||||
color: #ADADAD;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.addHKQS {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 26rpx;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<view class="myCard" @click="gotoDetailFun">
|
||||
<view class="cardTopName">排产单号:{{item.ProductWeaveNo}} {{item.WeaveFactoryName}}</view>
|
||||
<view class="cardRow">
|
||||
<view>排产日期:</view>
|
||||
<view>{{item.ProductWeaveDate}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>商品编码:</view>
|
||||
<view>{{item.FabricEmbryoNo}}-{{item.EmbryoCodeNo}}#</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>商品名称:</view>
|
||||
<view>{{item.FabricEmbryoName}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>商品颜色:</view>
|
||||
<view>{{item.EmbryoCodeName}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<text class="fzrLeft">进度状态:</text>
|
||||
<text class="fzrRight">{{item.WeaveCompleteTypeName}}</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view class="fzrLeft">生产情况:</view>
|
||||
<view class="fzrRight">{{item.WeaveFactoryWeaveRemark}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>排产数量:</view>
|
||||
<text class="fzrRight">{{item.WeaveRoll}}条 {{item.WeaveQty}}Kg</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>已产数量:</view>
|
||||
<text class="fzrRight">{{item.HasProductRoll}}条 {{item.HasProductQty}}Kg</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>派纱时间:</view>
|
||||
<view>{{item.WeaveFactorySendYarn}}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>派纱备注:</view>
|
||||
<view>{{item.WeaveFactorySendRemark}}</view>
|
||||
</view>
|
||||
<view v-if="!isDetail && !isSelect" class="lookDetail">
|
||||
<text>查看详情</text>
|
||||
<u-icon name="arrow-right" size="36"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isDetail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
gotoDetailFun: function() {
|
||||
if(this.isSelect) {
|
||||
return
|
||||
}
|
||||
//uni.$bjInfo = this.item;
|
||||
console.log("----->>>>" + this.index);
|
||||
uni.navigateTo({
|
||||
url: '/pages/saleship/detail?index=' + this.index
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label-width="80" label="品名:">
|
||||
<input type="text" v-model="FabricGoodsName" style="width:100px;" />
|
||||
<text >颜色:</text>
|
||||
<input type="text" v-model="GoodsCodeName" style="width:100px;" />
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="GetDetailListData">查询</button>
|
||||
</u-form-item>
|
||||
<view>
|
||||
<lyy-table headerFixed :contents="contents" :columnFixed="2" :headers="headers" :totalRow="totalRow"
|
||||
@rowClick="rowClick" @onPullup="pullup"></lyy-table>
|
||||
</view>
|
||||
|
||||
</u-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
parYarnGoodsBarCode2D,
|
||||
playSuccessAudio,
|
||||
playErrorAudio
|
||||
} from '../../common/util';
|
||||
export default {
|
||||
name: "btable",
|
||||
data() {
|
||||
return {
|
||||
FabricGoodsName:'',
|
||||
GoodsCodeName:'',
|
||||
loading: false,
|
||||
totalRow: ['Roll', 'Qty', 'UseRoll'],
|
||||
headers: [{
|
||||
label: '编号',
|
||||
key: 'FabricGoodsNo',
|
||||
width: this.upx2px(200)
|
||||
}, {
|
||||
label: '品名',
|
||||
key: 'FabricGoodsName',
|
||||
width: this.upx2px(150)
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'GoodsCodeNo',
|
||||
width: this.upx2px(150)
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'GoodsCodeName',
|
||||
width: this.upx2px(150),
|
||||
}, {
|
||||
label: '单位',
|
||||
key: 'UnitName',
|
||||
width: this.upx2px(100),
|
||||
},, {
|
||||
label: '仓库',
|
||||
key: 'StoreName',
|
||||
width: this.upx2px(150),
|
||||
},{
|
||||
label: '条数',
|
||||
key: 'Roll',
|
||||
width: this.upx2px(100),
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty',
|
||||
width: this.upx2px(200),
|
||||
}, {
|
||||
label: '可用',
|
||||
key: 'UseRoll',
|
||||
width: this.upx2px(100),
|
||||
}],
|
||||
contents: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
upx2px(value) {
|
||||
//#ifndef MP-WEIXIN
|
||||
return uni.upx2px(value) + 'px'
|
||||
//#endif
|
||||
//#ifdef MP-WEIXIN
|
||||
return uni.upx2px(value)
|
||||
//#endif
|
||||
},
|
||||
rowClick(e) {
|
||||
console.log(e)
|
||||
},
|
||||
pullup(){
|
||||
console.log('上拉')
|
||||
},
|
||||
GetDetailListData: function() {
|
||||
this.CarryDetailList = [];
|
||||
this.BillID = 0;
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP_GetStoreGoodsMasterSQL',
|
||||
params: [{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.contents = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.contents.push(aResultData[i]);
|
||||
};
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
console.log('-->出错')
|
||||
} else {
|
||||
console.log('-->出错')
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-progress {
|
||||
color: red;
|
||||
|
||||
::v-deep( .uni-progress-info) {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label="仓库名称" label-width="150" prop="StoreName">
|
||||
<u-input :border="border" type="select" :select-open="actionSheetShow" v-model="StoreName"
|
||||
placeholder="请选择仓库" @click="actionSheetShow = true"></u-input>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearStoreNameData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="FabricGoodsName" placeholder="成品名称" actionText=""></u-search>
|
||||
<u-search shape="square" v-model="GoodsCodeName" placeholder="成品色号" actionText=""></u-search>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="CrockNo" placeholder="缸号" actionText=""></u-search>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="GetGoodsDetailData">查询</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">总条数:{{GoodsSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{GoodsSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDataList" @onCellClick="GetGoodsDetailData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {parFabricGoodsBarCode2D} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
name: "btable",
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
actionSheetShow: false,
|
||||
StoreName:'',
|
||||
FabricGoodsName:'',
|
||||
GoodsCodeName:'',
|
||||
CrockNo:'',
|
||||
GoodsSumRoll:0,
|
||||
GoodsSumQty:0,
|
||||
GoodsDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '单据日期',
|
||||
key: 'BillDate'
|
||||
}, {
|
||||
label: '单据类型',
|
||||
key: 'BillTypeName'
|
||||
}, {
|
||||
label: '往来单位',
|
||||
key: 'CustomerName'
|
||||
}, {
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品名称',
|
||||
key: 'FabricGoodsName'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '备注',
|
||||
key: 'Remark'
|
||||
}],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getStoreNameData();
|
||||
},
|
||||
methods: {
|
||||
upx2px(value) {
|
||||
//#ifndef MP-WEIXIN
|
||||
return uni.upx2px(value) + 'px'
|
||||
//#endif
|
||||
//#ifdef MP-WEIXIN
|
||||
return uni.upx2px(value)
|
||||
//#endif
|
||||
},
|
||||
rowClick(e) {
|
||||
console.log(e)
|
||||
},
|
||||
pullup(){
|
||||
console.log('上拉')
|
||||
},
|
||||
// 点击actionSheet回调
|
||||
actionSheetCallback(index) {
|
||||
uni.hideKeyboard();
|
||||
this.StoreName = this.StoreNameDataList[index].text;
|
||||
},
|
||||
|
||||
ClearStoreNameData() {
|
||||
this.StoreName = '';
|
||||
},
|
||||
|
||||
getStoreNameData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: '%StoreFabricGoods%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.StoreNameDataList = res.data.data;
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.StoreNameDataList = [];
|
||||
} else {
|
||||
this.StoreNameDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetGoodsDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP_GetStoreGoodsAllInDetailSQL',
|
||||
params: [{
|
||||
name: 'SName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.GoodsCodeNo+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
},{
|
||||
name: 'CrockNo',
|
||||
value: '%'+this.CrockNo+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.GoodsDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsSumRoll = 0;
|
||||
this.GoodsSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.GoodsSumRoll = this.GoodsSumRoll + aResultData[i].Roll;
|
||||
this.GoodsSumQty = this.GoodsSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.GoodsSumRoll = this.GoodsSumRoll.toFixed(2) + '条';
|
||||
this.GoodsSumQty = this.GoodsSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDataList = [];
|
||||
} else {
|
||||
this.GoodsDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-progress {
|
||||
color: red;
|
||||
|
||||
::v-deep( .uni-progress-info) {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label="仓库名称" label-width="150" prop="StoreName">
|
||||
<u-input :border="border" type="select" :select-open="actionSheetShow" v-model="StoreName"
|
||||
placeholder="请选择仓库" @click="actionSheetShow = true"></u-input>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearStoreNameData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="FabricGoodsName" placeholder="成品名称" actionText=""></u-search>
|
||||
<u-search shape="square" v-model="GoodsCodeName" placeholder="成品色号" actionText=""></u-search>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="CrockNo" placeholder="缸号" actionText=""></u-search>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="GetGoodsDetailData">查询</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">总条数:{{GoodsSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{GoodsSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="GoodsDataList" @onCellClick="GetGoodsDetailData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {parFabricGoodsBarCode2D} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
name: "btable",
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
actionSheetShow: false,
|
||||
StoreName:'',
|
||||
FabricGoodsName:'',
|
||||
GoodsCodeName:'',
|
||||
CrockNo:'',
|
||||
GoodsSumRoll:0,
|
||||
GoodsSumQty:0,
|
||||
GoodsDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '单据日期',
|
||||
key: 'BillDate'
|
||||
}, {
|
||||
label: '单据类型',
|
||||
key: 'BillTypeName'
|
||||
}, {
|
||||
label: '往来单位',
|
||||
key: 'CustomerName'
|
||||
}, {
|
||||
label: '成品编号',
|
||||
key: 'FabricGoodsNo'
|
||||
}, {
|
||||
label: '成品名称',
|
||||
key: 'FabricGoodsName'
|
||||
}, {
|
||||
label: '成品色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '成品颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '备注',
|
||||
key: 'Remark'
|
||||
}],
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getStoreNameData();
|
||||
},
|
||||
methods: {
|
||||
upx2px(value) {
|
||||
//#ifndef MP-WEIXIN
|
||||
return uni.upx2px(value) + 'px'
|
||||
//#endif
|
||||
//#ifdef MP-WEIXIN
|
||||
return uni.upx2px(value)
|
||||
//#endif
|
||||
},
|
||||
rowClick(e) {
|
||||
console.log(e)
|
||||
},
|
||||
pullup(){
|
||||
console.log('上拉')
|
||||
},
|
||||
// 点击actionSheet回调
|
||||
actionSheetCallback(index) {
|
||||
uni.hideKeyboard();
|
||||
this.StoreName = this.StoreNameDataList[index].text;
|
||||
},
|
||||
|
||||
ClearStoreNameData() {
|
||||
this.StoreName = '';
|
||||
},
|
||||
|
||||
getStoreNameData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: '%StoreFabricGoods%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.StoreNameDataList = res.data.data;
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.StoreNameDataList = [];
|
||||
} else {
|
||||
this.StoreNameDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetGoodsDetailData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP_GetStoreGoodsAllOutDetailSQL',
|
||||
params: [{
|
||||
name: 'SName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.GoodsCodeNo+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
},{
|
||||
name: 'CrockNo',
|
||||
value: '%'+this.CrockNo+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.GoodsDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsSumRoll = 0;
|
||||
this.GoodsSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.GoodsSumRoll = this.GoodsSumRoll + aResultData[i].Roll;
|
||||
this.GoodsSumQty = this.GoodsSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.GoodsSumRoll = this.GoodsSumRoll.toFixed(2) + '条';
|
||||
this.GoodsSumQty = this.GoodsSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsDataList = [];
|
||||
} else {
|
||||
this.GoodsDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-progress {
|
||||
color: red;
|
||||
|
||||
::v-deep( .uni-progress-info) {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label="仓库名称" label-width="150" prop="StoreName">
|
||||
<u-input :border="border" type="select" :select-open="actionSheetShow" v-model="StoreName"
|
||||
placeholder="请选择仓库" @click="actionSheetShow = true"></u-input>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearStoreNameData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="round" v-model="FabricGoodsName" placeholder="请输入坯布编号" actionText=""></u-search>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="round" v-model="GoodsCodeName" placeholder="请输入色号颜色" actionText=""></u-search>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="GetDetailListData">查询</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">总条数:{{GoodsSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{GoodsSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="FabricGoodsDataList" @onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
<u-action-sheet :list="StoreNameDataList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {parFabricGoodsBarCode2D} from '../../common/util';
|
||||
import wybTable from '@/components/wyb-table/wyb-table.vue';
|
||||
export default {
|
||||
name: "btable",
|
||||
data() {
|
||||
return {
|
||||
borderColor: '#e4e7ed',
|
||||
align: 'center',
|
||||
index: 0,
|
||||
actionSheetShow: false,
|
||||
StoreName:'',
|
||||
FabricGoodsName:'',
|
||||
GoodsCodeName:'',
|
||||
GoodsSumRoll:0,
|
||||
GoodsSumQty:0,
|
||||
FabricGoodsDataList:[],
|
||||
GoodsCrockNoDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '编号',
|
||||
key: 'FabricGoodsNo'
|
||||
},{
|
||||
label: '名称',
|
||||
key: 'FabricGoodsName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '数量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '仓库',
|
||||
key: 'StoreName'
|
||||
}],
|
||||
headersDetail: [ {
|
||||
label: '编号',
|
||||
key: 'FabricGoodsNo'
|
||||
},{
|
||||
label: '名称',
|
||||
key: 'FabricGoodsName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'GoodsCodeNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'GoodsCodeName'
|
||||
}, {
|
||||
label: '缸号',
|
||||
key: 'CrockNo'
|
||||
}, {
|
||||
label: '条数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '数量',
|
||||
key: 'Qty'
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getStoreNameData();
|
||||
},
|
||||
methods: {
|
||||
upx2px(value) {
|
||||
//#ifndef MP-WEIXIN
|
||||
return uni.upx2px(value) + 'px'
|
||||
//#endif
|
||||
//#ifdef MP-WEIXIN
|
||||
return uni.upx2px(value)
|
||||
//#endif
|
||||
},
|
||||
rowClick(e) {
|
||||
console.log(e)
|
||||
},
|
||||
pullup(){
|
||||
console.log('上拉')
|
||||
},
|
||||
// 点击actionSheet回调
|
||||
actionSheetCallback(index) {
|
||||
uni.hideKeyboard();
|
||||
this.StoreName = this.StoreNameDataList[index].text;
|
||||
},
|
||||
|
||||
ClearStoreNameData() {
|
||||
this.StoreName = '';
|
||||
},
|
||||
|
||||
getStoreNameData() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreNameList',
|
||||
params: [{
|
||||
name: 'TypeNo',
|
||||
value: '%StoreFabricGoods%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.StoreNameDataList = res.data.data;
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.StoreNameDataList = [];
|
||||
} else {
|
||||
this.StoreNameDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetDetailListData: function() {
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP.GetStoreGoodsMasterSQL',
|
||||
params: [{
|
||||
name: 'StoreName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.FabricGoodsName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.GoodsCodeName+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.FabricGoodsDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsSumRoll = 0;
|
||||
this.GoodsSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.GoodsSumRoll = this.GoodsSumRoll + aResultData[i].Roll;
|
||||
this.GoodsSumQty = this.GoodsSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.GoodsSumRoll = this.GoodsSumRoll.toFixed(2) + '条';
|
||||
this.GoodsSumQty = this.GoodsSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.FabricGoodsDataList = [];
|
||||
} else {
|
||||
this.FabricGoodsDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
GetDetailCrockNoListData: function(index) {
|
||||
console.log(this.FabricGoodsDataList[index].FabricGoodsName);
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/opensql',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
format: 'json',
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
sql_command_id: 'APP_GetStoreGoodsDetailCrockNoSQL',
|
||||
params: [{
|
||||
name: 'StoreName',
|
||||
value: this.StoreName
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: this.FabricGoodsName
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: this.GoodsCodeName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.GoodsCrockNoDataList = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.GoodsCrockNoDataList.push(aResultData[i]);
|
||||
};
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.GoodsCrockNoDataList = [];
|
||||
} else {
|
||||
this.GoodsCrockNoDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-progress {
|
||||
color: red;
|
||||
|
||||
::v-deep( .uni-progress-info) {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user