vue-cli init
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<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"
|
||||
: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)">
|
||||
<BusinessCheckItem :item="item" :isSelect="isSelect" :index="index"></BusinessCheckItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<addBtn url="./storeYarnBusinessCheckAdd"></addBtn>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import BusinessCheckItem from '@/components/card/storeYarnBusinessCheckItem.vue';
|
||||
import util from '../../common/util';
|
||||
export default {
|
||||
components: {
|
||||
BusinessCheckItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreYarnBusinessCheckData();
|
||||
},
|
||||
/* watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
//console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
that.StoreYarnBusinessInData(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;
|
||||
},
|
||||
|
||||
StoreYarnBusinessCheckData: function() {
|
||||
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.GetStoreYarnBusinessCheckDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
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.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storeyarn/storeYarnBusinessCheckDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,986 @@
|
||||
<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="CheckBillNo" />
|
||||
<text class="mr26">盘点日期</text> {{$u.timeFormat(CheckBillDate, '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" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||
</view>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus1" style="width:250px;" @confirm="CheckBillDetailScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料名称:{{YarnName}}</text>
|
||||
<text class="title" style="width:200px;">原料缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料色号:{{YarnColorNo}}</text>
|
||||
<text class="title" style="width:200px;">原料颜色:{{YarnColorName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{YarnCrockNoOldRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{YarnCrockNoOldQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{YarnCrockNoNewRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{YarnCrockNoNewQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盈亏:{{YarnCrockNoSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸盈亏:{{YarnCrockNoSumQty}}Kg</text>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单盘前:{{YarnOldRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单盘前:{{YarnOldQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单实盘:{{YarnNewRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单实盘:{{YarnNewQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单盈亏:{{YarnSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单盈亏:{{YarnSumQty}}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="CheckDetailList"
|
||||
@onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="submitBtnFun">
|
||||
{{pageType ? '保存' : '提交'}}
|
||||
</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: '',
|
||||
testFocus0: true,
|
||||
testFocus1: false,
|
||||
CheckBillID: 0,
|
||||
CheckBillNo: '',
|
||||
CheckBillDate: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
CustomerID: 0,
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: 0,
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: 0,
|
||||
SaleUserName: '',
|
||||
SaleCustomerAddress: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
BillBusinessID: 0,
|
||||
BillTypeName: '',
|
||||
actionSheetShow: false,
|
||||
Remark: '',
|
||||
CheckDetailList:[],
|
||||
StoreNameDataList: [],
|
||||
BillBusinessDataList: [],
|
||||
YarnDataList: [],
|
||||
QRBarCode: '',
|
||||
YarnName: '',
|
||||
YarnColorNo: '',
|
||||
YarnColorName: '',
|
||||
YarnCrockNo: '',
|
||||
YarnCrockNoOldRoll: 0,
|
||||
YarnCrockNoOldQty: 0,
|
||||
YarnCrockNoNewRoll: 0,
|
||||
YarnCrockNoNewQty: 0,
|
||||
YarnCrockNoSumRoll: 0,
|
||||
YarnCrockNoSumQty: 0,
|
||||
YarnOldRoll: 0,
|
||||
YarnOldQty: 0,
|
||||
YarnNewRoll: 0,
|
||||
YarnNewQty: 0,
|
||||
YarnSumRoll: 0,
|
||||
YarnSumQty: 0,
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '盘前件数',
|
||||
key: 'OldRoll'
|
||||
}, {
|
||||
label: '盘前重量',
|
||||
key: 'OldQty'
|
||||
}, {
|
||||
label: '实盘件数',
|
||||
key: 'NewRoll'
|
||||
}, {
|
||||
label: '实盘重量',
|
||||
key: 'NewQty'
|
||||
},{
|
||||
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();
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
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: '%StoreYarnEmbryo%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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: '3'
|
||||
}, {
|
||||
name: 'TypeNo',
|
||||
value: 'BusinessTypeStoreYarn'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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.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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreYarnBusinessCheckDetail: 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.GetStoreYarnBusinessCheckDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.CheckBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
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.CheckDetailList = res.data.data;
|
||||
this.CheckBillNo = aResultData[0].BillNo;
|
||||
this.CheckBillDate = aResultData[0].BillDate;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.StoreStationNo = aResultData[0].StoreStationNo;
|
||||
this.StoreStationName = aResultData[0].StoreStationName;
|
||||
//this.YarnCrockNoOldRoll = 0;
|
||||
//this.YarnCrockNoOldQty = 0;
|
||||
//this.YarnCrockNoNewRoll = 0;
|
||||
//this.YarnCrockNoNewQty = 0;
|
||||
//this.YarnCrockNoSumRoll = 0;
|
||||
//this.YarnCrockNoSumQty = 0;
|
||||
this.YarnOldRoll = 0;
|
||||
this.YarnOldQty = 0;
|
||||
this.YarnNewRoll = 0;
|
||||
this.YarnNewQty = 0;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].OldRoll) != 0) {
|
||||
this.YarnOldRoll = this.YarnOldRoll + aResultData[i].OldRoll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].OldQty) != 0) {
|
||||
this.YarnOldQty = this.YarnOldQty + aResultData[i].OldQty;
|
||||
}
|
||||
if (parseFloat(aResultData[i].NewRoll) != 0) {
|
||||
this.YarnNewRoll = this.YarnNewRoll + aResultData[i].NewRoll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].NewQty) != 0) {
|
||||
this.YarnNewQty = this.YarnNewQty + aResultData[i].NewQty;
|
||||
}
|
||||
if (parseFloat(aResultData[i].Roll) != 0) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].Qty) != 0) {
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.YarnOldRoll = this.YarnOldRoll.toFixed(2);
|
||||
this.YarnOldQty = this.YarnOldQty.toFixed(2);
|
||||
this.YarnNewRoll = this.YarnNewRoll.toFixed(2);
|
||||
this.YarnNewQty = this.YarnNewQty.toFixed(2);
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2);
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2);
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.CheckDetailList = [];
|
||||
} else {
|
||||
this.CheckDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 日期修改
|
||||
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.CustomerName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '往来单位不能为空,请先输入往来单位!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '仓位名称不能为空,请先输入仓位编号!';
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.CheckBillID > 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_StoreYarnCreateCheckBillMaster',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.CheckBillID
|
||||
},
|
||||
{
|
||||
name: '@BillBusinessID',
|
||||
value: this.BillBusinessID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@CustomerID',
|
||||
value: this.CustomerID
|
||||
},
|
||||
{
|
||||
name: '@StoreStationNo',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
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);
|
||||
if (aResultData.BillDataStatus == '0' && aResultData.BillDataMessage ==
|
||||
'SUCCESS') {
|
||||
this.playSuccess();
|
||||
this.CheckBillID = aResultData.CheckStoreBillID;
|
||||
this.CheckBillNo = aResultData.CheckStoreBillNo;
|
||||
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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
CheckBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.CheckBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateCheckBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.CheckBillID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@StoreStationNo',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationName
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnName = aResultData.YarnName;
|
||||
this.YarnColorNo = aResultData.YarnColorNo;
|
||||
this.YarnColorName = aResultData.YarnColorName;
|
||||
this.YarnCrockNo = aResultData.YarnCrockNo
|
||||
this.YarnCrockNoOldRoll = parseFloat(aResultData.YarnCrockNoOldRoll);
|
||||
this.YarnCrockNoOldQty = parseFloat(aResultData.YarnCrockNoOldQty);
|
||||
this.YarnCrockNoNewRoll = parseFloat(aResultData.YarnCrockNoNewRoll);
|
||||
this.YarnCrockNoNewQty = parseFloat(aResultData.YarnCrockNoNewQty);
|
||||
this.YarnCrockNoSumRoll = parseFloat(aResultData.YarnCrockNoSumRoll);
|
||||
this.YarnCrockNoSumQty = parseFloat(aResultData.YarnCrockNoSumQty);
|
||||
this.YarnOldRoll = parseFloat(aResultData.YarnOldRoll);
|
||||
this.YarnOldQty = parseFloat(aResultData.YarnOldQty);
|
||||
this.YarnNewRoll = parseFloat(aResultData.YarnNewRoll);
|
||||
this.YarnNewQty = parseFloat(aResultData.YarnNewQty);
|
||||
this.YarnSumRoll = parseFloat(aResultData.YarnSumRoll);
|
||||
this.YarnSumQty = parseFloat(aResultData.YarnSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.StoreYarnBusinessCheckDetail();
|
||||
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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
addCzjlFun: function(action, _id) {
|
||||
let czjlObj = {
|
||||
create_date: new Date().getTime(),
|
||||
czRen: uni.$userInfo._id,
|
||||
pageType: 'quotation',
|
||||
}
|
||||
let xgInfoObj = that.xgInfoObj;
|
||||
czjlObj.dataId = xgInfoObj._id;
|
||||
czjlObj.type = '编辑';
|
||||
czjlObj.newUpdate = new Date().getTime();
|
||||
czjlObj.oldUpdate = xgInfoObj.update_date;
|
||||
let content = [];
|
||||
let str = '';
|
||||
if (that.bjName != xgInfoObj.bjName) {
|
||||
str = '修改 报价单名称 ,由 "' + xgInfoObj.bjName + '" 变更为 "' + that.bjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.sjName != xgInfoObj.sjName) {
|
||||
str = '修改 商机 ,由 "' + xgInfoObj.sjName + '" 变更为 "' + that.sjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.clientName != xgInfoObj.clientName) {
|
||||
str = '修改 客户 ,由 "' + xgInfoObj.clientName + '" 变更为 "' + that.clientName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjName != xgInfoObj.bjName) {
|
||||
str = '修改 报价单名称 ,由 "' + xgInfoObj.bjName + '" 变更为 "' + that.bjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.clientLxrId != xgInfoObj.clientLxrId) {
|
||||
str = '修改 联系人 ,由 "' + xgInfoObj.clientLxr + '" 变更为 "' + that.clientLxr + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjPrice != xgInfoObj.bjPrice) {
|
||||
str = '修改 报价金额 ,由 "' + xgInfoObj.bjPrice + '" 变更为 "' + that.bjPrice + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.describe != xgInfoObj.describe) {
|
||||
str = '修改 备注 ,由 "' + xgInfoObj.describe + '" 变更为 "' + that.describe + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjdDate != xgInfoObj.bjdDate) {
|
||||
str = '修改 报价日期 ,由 "' + xgInfoObj.bjdDate + '" 变更为 "' + that.bjdDate + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.fuZeRen != xgInfoObj.fuZeRen) {
|
||||
str = '修改 负责人 ,由 "' + xgInfoObj.fuZeRen + '" 变更为 "' + that.fuZeRen + '"'
|
||||
content.push(str)
|
||||
}
|
||||
czjlObj.content = content;
|
||||
uni.$czjlApiAddFun(czjlObj);
|
||||
},
|
||||
// 数据恢复
|
||||
setDataFun: function() {
|
||||
let obj = uni.$infoObj
|
||||
that.xgInfoObj = uni.$infoObj
|
||||
that.bjName = obj.bjName
|
||||
that.sjName = obj.sjName
|
||||
that.sjId = obj.sjId
|
||||
that.clientName = obj.clientName
|
||||
that.clientId = obj.clientId
|
||||
that.clientLxr = obj.clientLxr
|
||||
that.clientLxrId = obj.clientLxrId
|
||||
that.bjPrice = obj.bjPrice
|
||||
that.describe = obj.describe
|
||||
that.bjdDate = obj.bjdDate
|
||||
that.bjdDateTime = obj.bjdDateTime
|
||||
// that.cpList = obj.cpList
|
||||
// that.cpHzObj = obj.cpHzObj || {}
|
||||
that.fuZeRenId = obj.fuZeRenId
|
||||
that.fuZeRen = obj.fuZeRen
|
||||
that.getCpByIdFun()
|
||||
},
|
||||
getCpByIdFun: function() {
|
||||
let reqData = {
|
||||
action: 'getCp',
|
||||
params: {
|
||||
bjdId: that.xgInfoObj._id
|
||||
}
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
crmBaoJiaDanApi(reqData)
|
||||
.then(res => {
|
||||
let data = res.result.data;
|
||||
if (data.length > 0) {
|
||||
let cpHzObj = {
|
||||
discount: 0,
|
||||
price: 0,
|
||||
sumPrice: 0,
|
||||
totalNum: 0
|
||||
};
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var obj = data[i];
|
||||
obj.discount = (obj.sellingPrice / obj.price * 100).toFixed(2);
|
||||
obj.totalPrice = (obj.sellingPrice * obj.num).toFixed(2);
|
||||
data[i] = obj;
|
||||
cpHzObj.price += parseFloat(obj.price) * obj.num;
|
||||
cpHzObj.sumPrice += parseFloat(obj.sellingPrice) * obj.num;
|
||||
cpHzObj.totalNum += obj.num;
|
||||
}
|
||||
cpHzObj.discount = cpHzObj.sumPrice / cpHzObj.price * 100;
|
||||
that.cpHzObj = cpHzObj;
|
||||
that.cpList = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 根据商机id查询产品
|
||||
getCpBysjIdFun: function(sjId) {
|
||||
let reqData = {
|
||||
action: 'getCp',
|
||||
params: {
|
||||
sjId: sjId
|
||||
}
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
crmShangJiApi(reqData)
|
||||
.then(res => {
|
||||
let data = res.result.data;
|
||||
if (data.length > 0) {
|
||||
let cpHzObj = {
|
||||
discount: 0,
|
||||
price: 0,
|
||||
sumPrice: 0,
|
||||
totalNum: 0
|
||||
};
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var obj = data[i];
|
||||
obj._id = '';
|
||||
obj.discount = (obj.sellingPrice / obj.price * 100).toFixed(2);
|
||||
obj.totalPrice = (obj.sellingPrice * obj.num).toFixed(2);
|
||||
data[i] = obj;
|
||||
cpHzObj.price += parseFloat(obj.price) * obj.num;
|
||||
cpHzObj.sumPrice += parseFloat(obj.sellingPrice) * obj.num;
|
||||
cpHzObj.totalNum += obj.num;
|
||||
}
|
||||
cpHzObj.discount = cpHzObj.sumPrice / cpHzObj.price * 100;
|
||||
that.cpHzObj = cpHzObj;
|
||||
that.cpList = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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,533 @@
|
||||
<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" :focus="testFocus0" style="width:120px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:120px;">仓库名称:{{StoreStationName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus1" style="width:250px;"
|
||||
@confirm="CheckBillDetailScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料名称:{{YarnName}}</text>
|
||||
<text class="title" style="width:200px;">原料缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料色号:{{YarnColorNo}}</text>
|
||||
<text class="title" style="width:200px;">原料颜色:{{YarnColorName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{YarnCrockNoOldRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸盘前:{{YarnCrockNoOldQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{YarnCrockNoNewRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸实盘:{{YarnCrockNoNewQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸盈亏:{{YarnCrockNoSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸盈亏:{{YarnCrockNoSumQty}}Kg</text>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单盘前:{{YarnOldRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单盘前:{{YarnOldQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单实盘:{{YarnNewRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单实盘:{{YarnNewQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本单盈亏:{{YarnSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本单盈亏:{{YarnSumQty}}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="CheckDetailList"/>
|
||||
<!-- <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>
|
||||
</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,
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
BillNo: '',
|
||||
BillDate: '',
|
||||
CustomerName: '',
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
YarnName: '',
|
||||
YarnColorNo: '',
|
||||
YarnColorName: '',
|
||||
YarnCrockNo: '',
|
||||
testFocus0: true,
|
||||
YarnCrockNoOldRoll: 0,
|
||||
YarnCrockNoOldQty: 0,
|
||||
YarnCrockNoNewRoll: 0,
|
||||
YarnCrockNoNewQty: 0,
|
||||
YarnCrockNoSumRoll: 0,
|
||||
YarnCrockNoSumQty: 0,
|
||||
YarnOldRoll: 0,
|
||||
YarnOldQty: 0,
|
||||
YarnNewRoll: 0,
|
||||
YarnNewQty: 0,
|
||||
YarnSumRoll: 0,
|
||||
YarnSumQty: 0,
|
||||
CheckDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '盘前件数',
|
||||
key: 'OldRoll'
|
||||
}, {
|
||||
label: '盘前重量',
|
||||
key: 'OldQty'
|
||||
}, {
|
||||
label: '实盘件数',
|
||||
key: 'NewRoll'
|
||||
}, {
|
||||
label: '实盘重量',
|
||||
key: 'NewQty'
|
||||
},{
|
||||
label: '盈亏件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '盈亏重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.BillMasterID = e.billid;
|
||||
}
|
||||
console.log("---BillID->" + this.BillMasterID);
|
||||
this.StoreYarnBusinessCheckDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
CheckBillDetailScan() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + aStrBarCode + "<----");
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateCheckBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.BillMasterID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@StoreStationNo',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationName
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnName = aResultData.YarnName;
|
||||
this.YarnColorNo = aResultData.YarnColorNo;
|
||||
this.YarnColorName = aResultData.YarnColorName;
|
||||
this.YarnCrockNo = aResultData.YarnCrockNo
|
||||
this.YarnCrockNoOldRoll = parseFloat(aResultData.YarnCrockNoOldRoll);
|
||||
this.YarnCrockNoOldQty = parseFloat(aResultData.YarnCrockNoOldQty);
|
||||
this.YarnCrockNoNewRoll = parseFloat(aResultData.YarnCrockNoNewRoll);
|
||||
this.YarnCrockNoNewQty = parseFloat(aResultData.YarnCrockNoNewQty);
|
||||
this.YarnCrockNoSumRoll = parseFloat(aResultData.YarnCrockNoSumRoll);
|
||||
this.YarnCrockNoSumQty = parseFloat(aResultData.YarnCrockNoSumQty);
|
||||
this.YarnOldRoll = parseFloat(aResultData.YarnOldRoll);
|
||||
this.YarnOldQty = parseFloat(aResultData.YarnOldQty);
|
||||
this.YarnNewRoll = parseFloat(aResultData.YarnNewRoll);
|
||||
this.YarnNewQty = parseFloat(aResultData.YarnNewQty);
|
||||
this.YarnSumRoll = parseFloat(aResultData.YarnSumRoll);
|
||||
this.YarnSumQty = parseFloat(aResultData.YarnSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
this.StoreYarnBusinessCheckDetail();
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '扫描出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描出仓出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreYarnBusinessCheckDetail: 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.GetStoreYarnBusinessCheckDetailSQL',
|
||||
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.CheckDetailList = 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.StoreStationNo = aResultData[0].ScanStoreStationNo;
|
||||
this.StoreStationName = aResultData[0].ScanStoreStationName;
|
||||
//this.YarnCrockNoOldRoll = 0;
|
||||
//this.YarnCrockNoOldQty = 0;
|
||||
//this.YarnCrockNoNewRoll = 0;
|
||||
//this.YarnCrockNoNewQty = 0;
|
||||
//this.YarnCrockNoSumRoll = 0;
|
||||
//this.YarnCrockNoSumQty = 0;
|
||||
this.YarnOldRoll = 0;
|
||||
this.YarnOldQty = 0;
|
||||
this.YarnNewRoll = 0;
|
||||
this.YarnNewQty = 0;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].OldRoll) != 0) {
|
||||
this.YarnOldRoll = this.YarnOldRoll + aResultData[i].OldRoll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].OldQty) != 0) {
|
||||
this.YarnOldQty = this.YarnOldQty + aResultData[i].OldQty;
|
||||
}
|
||||
if (parseFloat(aResultData[i].NewRoll) != 0) {
|
||||
this.YarnNewRoll = this.YarnNewRoll + aResultData[i].NewRoll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].NewQty) != 0) {
|
||||
this.YarnNewQty = this.YarnNewQty + aResultData[i].NewQty;
|
||||
}
|
||||
if (parseFloat(aResultData[i].Roll) != 0) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
if (parseFloat(aResultData[i].Qty) != 0) {
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.YarnOldRoll = this.YarnOldRoll.toFixed(2);
|
||||
this.YarnOldQty = this.YarnOldQty.toFixed(2);
|
||||
this.YarnNewRoll = this.YarnNewRoll.toFixed(2);
|
||||
this.YarnNewQty = this.YarnNewQty.toFixed(2);
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2);
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2);
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.CheckDetailList = [];
|
||||
} else {
|
||||
this.CheckDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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,145 @@
|
||||
<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"
|
||||
: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)">
|
||||
<BusinessInItem :item="item" :isSelect="isSelect" :index="index"></BusinessInItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import BusinessInItem from '@/components/card/storeYarnBusinessInItem.vue';
|
||||
import util from '../../common/util';
|
||||
export default {
|
||||
components: {
|
||||
BusinessInItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//tbOrderCouponList: [],
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
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;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreYarnBusinessInData();
|
||||
},
|
||||
/* watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
//console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
that.StoreYarnBusinessInData(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;
|
||||
},
|
||||
|
||||
StoreYarnBusinessInData: function() {
|
||||
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.GetStoreYarnBusinessInDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
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.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storeyarn/storeYarnBusinessInDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,467 @@
|
||||
<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 label-width="150" label="扫描仓位:">
|
||||
<input type="text" v-model="StoreStationNo" :focus="testFocus0" style="width:80px;"
|
||||
@confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:80px;">名称:{{StoreStationName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus1" style="width:250px;"
|
||||
@confirm="InBillDetailScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料名称:{{YarnName}}</text>
|
||||
<text class="title" style="width:200px;">原料缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料色号:{{YarnColorNo}}</text>
|
||||
<text class="title" style="width:200px;">原料颜色:{{YarnColorName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:120px;">共:{{YarnCrockNoSumRoll}}件</text>
|
||||
<text class="title" style="width:120px;">已扫:{{YarnCrockNoHasScanRoll}}件</text>
|
||||
<text class="title" style="width:120px;">未扫:{{YarnCrockNoNotScanRoll}}件</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="InDetailList"/>
|
||||
<!-- <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>
|
||||
</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,
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
BillNo: '',
|
||||
BillDate: '',
|
||||
CustomerName: '',
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
YarnName: '',
|
||||
YarnColorNo: '',
|
||||
YarnColorName: '',
|
||||
YarnCrockNo: '',
|
||||
testFocus0: true,
|
||||
testFocus1: false,
|
||||
YarnCrockNoSumRoll: 0,
|
||||
YarnCrockNoHasScanRoll: 0,
|
||||
YarnCrockNoNotScanRoll: 0,
|
||||
YarnSumRoll: 0,
|
||||
YarnSumQty: 0,
|
||||
InDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.BillMasterID = e.billid;
|
||||
}
|
||||
console.log("---BillID->" + this.BillMasterID);
|
||||
this.StoreYarnBusinessInDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
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.StoreNameID = parseInt(aResultData[i].StoreNameID);
|
||||
};
|
||||
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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
InBillDetailScan() {
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先扫描仓位';
|
||||
return;
|
||||
}
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + aStrBarCode + "<----");
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnInBillDetailScan',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.BillMasterID
|
||||
},
|
||||
{
|
||||
name: '@BillTypeID',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnName = aResultData.YarnName;
|
||||
this.YarnColorNo = aResultData.YarnColorNo;
|
||||
this.YarnColorName = aResultData.YarnColorName;
|
||||
this.YarnCrockNo = aResultData.YarnCrockNo;
|
||||
this.YarnCrockNoSumRoll = parseFloat(aResultData.YarnCrockNoSumRoll);
|
||||
this.YarnCrockNoHasScanRoll = parseFloat(aResultData.YarnCrockNoHasScanRoll);
|
||||
this.YarnCrockNoNotScanRoll = parseFloat(aResultData.YarnCrockNoNotScanRoll);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '入仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreYarnBusinessInDetail: 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.GetStoreYarnBusinessInDetailSQL',
|
||||
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.InDetailList = res.data.data;
|
||||
this.BillNo = aResultData[0].BillNo;
|
||||
this.BillDate = aResultData[0].BillDate;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.InDetailList = [];
|
||||
} else {
|
||||
this.InDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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,133 @@
|
||||
<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"
|
||||
: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)">
|
||||
<BusinessOutItem :item="item" :isSelect="isSelect" :index="index"></BusinessOutItem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<addBtn url="./storeYarnBusinessOutAdd"></addBtn>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let that = '';
|
||||
import addBtn from '@/components/addBtn/addBtn.vue'
|
||||
import BusinessOutItem from '@/components/card/storeYarnBusinessOutItem.vue';
|
||||
import util from '../../common/util';
|
||||
export default {
|
||||
components: {
|
||||
BusinessOutItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{title: '未审核', status: '0'},
|
||||
{title: '已审核', status: '1'},
|
||||
],
|
||||
activeTabIndex: 0,
|
||||
ItemDataList: [],
|
||||
pageIndex: 1,
|
||||
isMore: true,
|
||||
scrollHeight: '667px',
|
||||
triggered: false,
|
||||
isSelect: false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.scrollHeight = res.windowHeight - 40 + 'px';
|
||||
}
|
||||
})
|
||||
that.StoreYarnBusinessInData();
|
||||
},
|
||||
/* watch: {
|
||||
activeTabIndex: {
|
||||
deep: true, // 深度监听
|
||||
handler(newVal, oldVal) {
|
||||
//console.log("activeTabIndex参数改变,即将刷新...", `新值:${newVal}`, `旧值:${oldVal}`);
|
||||
that.StoreYarnBusinessInData(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;
|
||||
},
|
||||
|
||||
StoreYarnBusinessInData: function() {
|
||||
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.GetStoreYarnBusinessOutDataSQL',
|
||||
params: [{
|
||||
name: 'CommitStatus',
|
||||
value: aCommitStatus
|
||||
}, {
|
||||
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.concat(data);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 卡片点击方法
|
||||
cardClickFun: function(item, index) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/storeyarn/storeYarnBusinessOutDetail?billid=' + item.BillMasterID
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,838 @@
|
||||
<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="OutBillNo" />
|
||||
<text class="mr26">出仓日期</text> {{$u.timeFormat(OutBillDate, '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-column ptb20 mt32">
|
||||
<view style="margin-bottom: 8rpx;">
|
||||
<text>备注内容</text>
|
||||
</view>
|
||||
<u-input v-model="Remark" type="textarea" :border="true" :height="100" :auto-height="true" />
|
||||
</view>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus0" style="width:250px;"
|
||||
@confirm="OutBillDetailScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料名称:{{YarnName}}</text>
|
||||
<text class="title" style="width:200px;">原料缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料色号:{{YarnColorNo}}</text>
|
||||
<text class="title" style="width:200px;">原料颜色:{{YarnColorName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸已扫:{{YarnCrockNoSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸已扫:{{YarnCrockNoSumQty}}Kg</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="OutDetailList"
|
||||
@onCellClick="GetDetailCrockNoListData" />
|
||||
<!-- <wyb-table ref="table" :headers="headersDetail" :contents="GoodsCrockNoDataList" height="600rpx" /> !-->
|
||||
</view>
|
||||
|
||||
<!--提交按钮-->
|
||||
<view class="submitView">
|
||||
<u-button type="primary" class="submitBtn" :ripple="true" ripple-bg-color="#909399" @click="submitBtnFun">
|
||||
{{pageType ? '保存' : '提交'}}
|
||||
</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: '',
|
||||
testFocus0: true,
|
||||
OutBillID: 0,
|
||||
OutBillNo: '',
|
||||
OutBillDate: '',
|
||||
StoreNameID: '',
|
||||
StoreName: '',
|
||||
CustomerID: 0,
|
||||
CustomerName: '',
|
||||
PlanDepartmentID: 0,
|
||||
PlanDepartmentName: '',
|
||||
SaleUserID: 0,
|
||||
SaleUserName: '',
|
||||
SaleCustomerAddress: '',
|
||||
BillBusinessID: 0,
|
||||
BillTypeName: '',
|
||||
actionSheetShow: false,
|
||||
Remark: '',
|
||||
OutDetailList:[],
|
||||
StoreNameDataList: [],
|
||||
BillBusinessDataList: [],
|
||||
YarnDataList: [],
|
||||
QRBarCode: '',
|
||||
YarnName: '',
|
||||
YarnColorNo: '',
|
||||
YarnColorName: '',
|
||||
YarnCrockNo: '',
|
||||
YarnSumRoll: 0,
|
||||
YarnSumQty: 0,
|
||||
YarnCrockNoSumRoll: 0,
|
||||
YarnCrockNoSumQty: 0,
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
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();
|
||||
},
|
||||
|
||||
// 展示相应数据选择框
|
||||
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: '%StoreYarnEmbryo%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
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: '2'
|
||||
}, {
|
||||
name: 'TypeNo',
|
||||
value: 'BusinessTypeStoreYarn'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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.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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreYarnBusinessOutDetail: 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.GetStoreYarnBusinessOutDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.OutBillID
|
||||
}]
|
||||
},
|
||||
},
|
||||
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.OutDetailList = res.data.data;
|
||||
this.OutBillNo = aResultData[0].BillNo;
|
||||
this.OutBillDate = aResultData[0].BillDate;
|
||||
this.CustomerName = aResultData[0].CustomerName;
|
||||
this.StoreName = aResultData[0].StoreName;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.OutDetailList = [];
|
||||
} else {
|
||||
this.OutDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 日期修改
|
||||
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.CustomerName == '') {
|
||||
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_StoreYarnCreateOutBillMaster',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillMasterID',
|
||||
value: this.OutBillID
|
||||
},
|
||||
{
|
||||
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.OutBillID = aResultData.OutStoreBillID;
|
||||
this.OutBillNo = aResultData.OutStoreBillNo;
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = 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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
OutBillDetailScan() {
|
||||
if (this.StoreNameID == 0 && this.OutBillNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus0 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateOutBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.OutBillID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnGoodsName = aResultData.YarnGoodsName;
|
||||
this.YarnGoodsCodeName = aResultData.YarnGoodsCodeName;
|
||||
this.YarnCrockNoSumRoll = parseFloat(aResultData.YarnCrockNoSumRoll);
|
||||
this.YarnCrockNoSumQty = parseFloat(aResultData.YarnCrockNoSumQty);
|
||||
this.YarnSumRoll = parseFloat(aResultData.YarnSumRoll);
|
||||
this.YarnSumQty = parseFloat(aResultData.YarnSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.StoreYarnBusinessOutDetail();
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '出仓出错,' + res.data.msg;
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
addCzjlFun: function(action, _id) {
|
||||
let czjlObj = {
|
||||
create_date: new Date().getTime(),
|
||||
czRen: uni.$userInfo._id,
|
||||
pageType: 'quotation',
|
||||
}
|
||||
let xgInfoObj = that.xgInfoObj;
|
||||
czjlObj.dataId = xgInfoObj._id;
|
||||
czjlObj.type = '编辑';
|
||||
czjlObj.newUpdate = new Date().getTime();
|
||||
czjlObj.oldUpdate = xgInfoObj.update_date;
|
||||
let content = [];
|
||||
let str = '';
|
||||
if (that.bjName != xgInfoObj.bjName) {
|
||||
str = '修改 报价单名称 ,由 "' + xgInfoObj.bjName + '" 变更为 "' + that.bjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.sjName != xgInfoObj.sjName) {
|
||||
str = '修改 商机 ,由 "' + xgInfoObj.sjName + '" 变更为 "' + that.sjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.clientName != xgInfoObj.clientName) {
|
||||
str = '修改 客户 ,由 "' + xgInfoObj.clientName + '" 变更为 "' + that.clientName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjName != xgInfoObj.bjName) {
|
||||
str = '修改 报价单名称 ,由 "' + xgInfoObj.bjName + '" 变更为 "' + that.bjName + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.clientLxrId != xgInfoObj.clientLxrId) {
|
||||
str = '修改 联系人 ,由 "' + xgInfoObj.clientLxr + '" 变更为 "' + that.clientLxr + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjPrice != xgInfoObj.bjPrice) {
|
||||
str = '修改 报价金额 ,由 "' + xgInfoObj.bjPrice + '" 变更为 "' + that.bjPrice + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.describe != xgInfoObj.describe) {
|
||||
str = '修改 备注 ,由 "' + xgInfoObj.describe + '" 变更为 "' + that.describe + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.bjdDate != xgInfoObj.bjdDate) {
|
||||
str = '修改 报价日期 ,由 "' + xgInfoObj.bjdDate + '" 变更为 "' + that.bjdDate + '"'
|
||||
content.push(str)
|
||||
}
|
||||
if (that.fuZeRen != xgInfoObj.fuZeRen) {
|
||||
str = '修改 负责人 ,由 "' + xgInfoObj.fuZeRen + '" 变更为 "' + that.fuZeRen + '"'
|
||||
content.push(str)
|
||||
}
|
||||
czjlObj.content = content;
|
||||
uni.$czjlApiAddFun(czjlObj);
|
||||
},
|
||||
// 数据恢复
|
||||
setDataFun: function() {
|
||||
let obj = uni.$infoObj
|
||||
that.xgInfoObj = uni.$infoObj
|
||||
that.bjName = obj.bjName
|
||||
that.sjName = obj.sjName
|
||||
that.sjId = obj.sjId
|
||||
that.clientName = obj.clientName
|
||||
that.clientId = obj.clientId
|
||||
that.clientLxr = obj.clientLxr
|
||||
that.clientLxrId = obj.clientLxrId
|
||||
that.bjPrice = obj.bjPrice
|
||||
that.describe = obj.describe
|
||||
that.bjdDate = obj.bjdDate
|
||||
that.bjdDateTime = obj.bjdDateTime
|
||||
// that.cpList = obj.cpList
|
||||
// that.cpHzObj = obj.cpHzObj || {}
|
||||
that.fuZeRenId = obj.fuZeRenId
|
||||
that.fuZeRen = obj.fuZeRen
|
||||
that.getCpByIdFun()
|
||||
},
|
||||
getCpByIdFun: function() {
|
||||
let reqData = {
|
||||
action: 'getCp',
|
||||
params: {
|
||||
bjdId: that.xgInfoObj._id
|
||||
}
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
crmBaoJiaDanApi(reqData)
|
||||
.then(res => {
|
||||
let data = res.result.data;
|
||||
if (data.length > 0) {
|
||||
let cpHzObj = {
|
||||
discount: 0,
|
||||
price: 0,
|
||||
sumPrice: 0,
|
||||
totalNum: 0
|
||||
};
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var obj = data[i];
|
||||
obj.discount = (obj.sellingPrice / obj.price * 100).toFixed(2);
|
||||
obj.totalPrice = (obj.sellingPrice * obj.num).toFixed(2);
|
||||
data[i] = obj;
|
||||
cpHzObj.price += parseFloat(obj.price) * obj.num;
|
||||
cpHzObj.sumPrice += parseFloat(obj.sellingPrice) * obj.num;
|
||||
cpHzObj.totalNum += obj.num;
|
||||
}
|
||||
cpHzObj.discount = cpHzObj.sumPrice / cpHzObj.price * 100;
|
||||
that.cpHzObj = cpHzObj;
|
||||
that.cpList = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 根据商机id查询产品
|
||||
getCpBysjIdFun: function(sjId) {
|
||||
let reqData = {
|
||||
action: 'getCp',
|
||||
params: {
|
||||
sjId: sjId
|
||||
}
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
crmShangJiApi(reqData)
|
||||
.then(res => {
|
||||
let data = res.result.data;
|
||||
if (data.length > 0) {
|
||||
let cpHzObj = {
|
||||
discount: 0,
|
||||
price: 0,
|
||||
sumPrice: 0,
|
||||
totalNum: 0
|
||||
};
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var obj = data[i];
|
||||
obj._id = '';
|
||||
obj.discount = (obj.sellingPrice / obj.price * 100).toFixed(2);
|
||||
obj.totalPrice = (obj.sellingPrice * obj.num).toFixed(2);
|
||||
data[i] = obj;
|
||||
cpHzObj.price += parseFloat(obj.price) * obj.num;
|
||||
cpHzObj.sumPrice += parseFloat(obj.sellingPrice) * obj.num;
|
||||
cpHzObj.totalNum += obj.num;
|
||||
}
|
||||
cpHzObj.discount = cpHzObj.sumPrice / cpHzObj.price * 100;
|
||||
that.cpHzObj = cpHzObj;
|
||||
that.cpList = data;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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,403 @@
|
||||
<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 label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus0" style="width:250px;"
|
||||
@confirm="OutBillDetailScan" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料名称:{{YarnName}}</text>
|
||||
<text class="title" style="width:200px;">原料缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">原料色号:{{YarnColorNo}}</text>
|
||||
<text class="title" style="width:200px;">原料颜色:{{YarnColorName}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">本缸已扫:{{YarnCrockNoSumRoll}}件</text>
|
||||
<text class="title" style="width:200px;">本缸已扫:{{YarnCrockNoSumQty}}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;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="OutDetailList"/>
|
||||
<!-- <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>
|
||||
</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,
|
||||
actionSheetShow: false,
|
||||
QRBarCode: '',
|
||||
BillNo: '',
|
||||
BillDate: '',
|
||||
CustomerName: '',
|
||||
StoreNameID: 0,
|
||||
StoreName: '',
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
YarnName: '',
|
||||
YarnColorNo: '',
|
||||
YarnColorName: '',
|
||||
YarnCrockNo: '',
|
||||
testFocus0: true,
|
||||
YarnCrockNoSumRoll: 0,
|
||||
YarnCrockNoSumQty: 0,
|
||||
YarnSumRoll: 0,
|
||||
YarnSumQty: 0,
|
||||
OutDetailList: [],
|
||||
BillDataMessage: '',
|
||||
headersMaster: [{
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
that = this;
|
||||
if (e.billid) {
|
||||
that.BillMasterID = e.billid;
|
||||
}
|
||||
console.log("---BillID->" + this.BillMasterID);
|
||||
this.StoreYarnBusinessOutDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
OutBillDetailScan() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + aStrBarCode + "<----");
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateOutBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.BillMasterID
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnName = aResultData.YarnName;
|
||||
this.YarnColorNo = aResultData.YarnColorNo;
|
||||
this.YarnColorName = aResultData.YarnColorName;
|
||||
this.YarnCrockNo = aResultData.YarnCrockNo;
|
||||
this.YarnCrockNoSumRoll = parseFloat(aResultData.YarnCrockNoSumRoll);
|
||||
this.YarnCrockNoSumQty = parseFloat(aResultData.YarnCrockNoSumQty);
|
||||
this.YarnSumRoll = parseFloat(aResultData.YarnSumRoll);
|
||||
this.YarnSumQty = parseFloat(aResultData.YarnSumQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '扫描出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描出仓出错,' + res.data.msg;
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
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);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
StoreYarnBusinessOutDetail: 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.GetStoreYarnBusinessOutDetailSQL',
|
||||
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.OutDetailList = 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;
|
||||
console.log("---this.StoreNameID ->>>" + this.StoreNameID )
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
if (parseFloat(aResultData[i].Roll) > 0) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
}
|
||||
|
||||
if (parseFloat(aResultData[i].Qty) > 0) {
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
}
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.OutDetailList = [];
|
||||
} else {
|
||||
this.OutDetailList = [];
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</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,555 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label-width="150" label="扫描仓位:">
|
||||
<input type="text" v-model="StoreStationNo" :focus="testFocus0" style="width:80px;"
|
||||
@confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:80px;">名称:{{StoreStationName}}</text>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="CreateNewBillMaster">新增单据</button>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="进仓单号:">
|
||||
<input type="text" v-model="InStoreBillNo" :focus="testFocus1" style="width:120px;" @confirm="GetDetailListData" />
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearBillData">清空数据</button>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料名称:">
|
||||
<text class="title" style="width:150px;">{{YarnGoodsName}}</text>
|
||||
<text class="title" style="width:150px;">缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="色号颜色:">
|
||||
<text class="title" style="width:200px;">{{YarnGoodsCodeNo}} {{YarnGoodsCodeName}} {{YarnGoodsColorNo}}</text>
|
||||
<checkbox-group @change="ViewDetailChange">
|
||||
<checkbox ref="checkBoxRef" :checked="ViewDetailStatus">显示明细</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">箱号:{{YarnBoxBillNo}}</text>
|
||||
<text class="title" style="width:90px;">个数:{{YarnBoxRoll}}</text>
|
||||
<text class="title" style="width:90px;">毛重:{{YarnGrossQty}}</text>
|
||||
<text class="title" style="width:90px;">净重:{{YarnNetQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus2" style="width:250px;"
|
||||
@confirm="CreateNewBillDetail" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:110px;">缸号件数:{{YarnCrockNoRoll}}</text>
|
||||
<text class="title" style="width:140px;">缸号毛重:{{YarnCrockNoGrossQty}}</text>
|
||||
<text class="title" style="width:140px;">缸号净重:{{YarnCrockNoNetQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:110px;">本单件数:{{YarnBillSumRoll}}</text>
|
||||
<text class="title" style="width:140px;">本单毛重:{{YarnBillSumGrossQty}}</text>
|
||||
<text class="title" style="width:140px;">本单净重:{{YarnBillSumNetQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnGoodsDetailDataList"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
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,
|
||||
YarnDetailList: [],
|
||||
QRBarCode: '',
|
||||
InStoreBillID: 0,
|
||||
InStoreBillNo: '',
|
||||
InStoreMasterNo: '',
|
||||
StoreNameID: 0,
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
DyeWorksDigCode: 0,
|
||||
YarnGoodsNo: '',
|
||||
YarnGoodsName: '',
|
||||
YarnGoodsCodeNo: '',
|
||||
YarnGoodsCodeName: '',
|
||||
YarnGoodsColorNo: '',
|
||||
YarnCrockNo: '',
|
||||
YarnBoxBillNo: '',
|
||||
YarnBoxRoll: '', //每箱个数
|
||||
YarnRoll: '',
|
||||
YarnGrossQty: '',
|
||||
YarnNetQty: '',
|
||||
YarnCrockNoRoll: '',
|
||||
YarnCrockNoGrossQty: '',
|
||||
YarnCrockNoNetQty: '',
|
||||
YarnBillSumRoll: '',
|
||||
YarnBillSumGrossQty: '',
|
||||
YarnBillSumNetQty: '',
|
||||
testFocus0: true, // TODO: 修改正确的变量名, 暂时未测试名字
|
||||
testFocus1: false,
|
||||
testFocus2: false,
|
||||
ViewDetailStatus: true,
|
||||
BillDataMessage: '',
|
||||
YarnGoodsDetailDataList:[],
|
||||
headersMaster: [{
|
||||
label: '名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '入仓件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '已扫件数',
|
||||
key: 'SumRoll'
|
||||
}, {
|
||||
label: '未扫件数',
|
||||
key: 'NotScanRoll'
|
||||
}, {
|
||||
label: '毛重',
|
||||
key: 'GrossQty'
|
||||
}, {
|
||||
label: '净重',
|
||||
key: 'NetQty'
|
||||
}],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
ViewDetailChange: function() {
|
||||
this.ViewDetailStatus = !this.ViewDetailStatus;
|
||||
if (this.ViewDetailStatus==true)
|
||||
{
|
||||
this.GetDetailListData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
}
|
||||
},
|
||||
borderColorChange(index) {
|
||||
this.borderColor = index == 0 ? '#e4e7ed' : index == 1 ? '#2979ff' : '#ff9900';
|
||||
},
|
||||
alignChange(index) {
|
||||
this.align = index == 0 ? 'left' : index == 1 ? 'center' : 'right';
|
||||
},
|
||||
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.StoreNameID = parseInt(aResultData[i].StoreNameID);
|
||||
};
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
ClearBillData: function() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.YarnDetailList = [];
|
||||
this.QRBarCode = "";
|
||||
this.InStoreBillID = 0;
|
||||
this.InStoreBillNo = "";
|
||||
this.InStoreMasterNo = "";
|
||||
this.StoreNameID = 0;
|
||||
this.StoreStationNo = "";
|
||||
this.StoreStationName = "";
|
||||
this.DyeWorksDigCode = 0;
|
||||
this.YarnGoodsNo = "";
|
||||
this.YarnGoodsName = "";
|
||||
this.YarnGoodsCodeNo = "";
|
||||
this.YarnGoodsCodeName = "";
|
||||
this.YarnGoodsColorNo = "";
|
||||
this.YarnCrockNo = "";
|
||||
this.YarnBoxBillNo = "";
|
||||
this.YarnBoxRoll = "";
|
||||
this.YarnRoll = "";
|
||||
this.YarnGrossQty = "";
|
||||
this.YarnNetQty = "";
|
||||
this.YarnCrockNoRoll = "";
|
||||
this.YarnCrockNoGrossQty = "";
|
||||
this.YarnCrockNoNetQty = "";
|
||||
this.YarnBillSumRoll = 0;
|
||||
this.YarnBillSumGrossQty = 0;
|
||||
this.YarnBillSumNetQty = 0;
|
||||
this.BillDataMessage = "";
|
||||
/*
|
||||
this.StoreStationNo = "";
|
||||
this.BillNo = "";
|
||||
this.StoreStationName = "";
|
||||
this.FabricGoodsNo = "";
|
||||
this.FabricGoodsName = "";
|
||||
this.GoodsCodeNo = "";
|
||||
this.GoodsCodeName = "";
|
||||
this.CrockNo = "";
|
||||
this.GoodsBillNo = "";
|
||||
this.BarCodeDig = "";
|
||||
this.BarCodeQty = "";
|
||||
this.CrockNoSumRoll = "";
|
||||
this.CrockNoSumQty = "";
|
||||
this.StationNameSumRoll = "";
|
||||
this.StationNameSumQty = "";
|
||||
this.BillSumRoll = "";
|
||||
this.BillSumQty = "";
|
||||
this.BarCode = '';
|
||||
*/
|
||||
},
|
||||
CreateNewBillMaster() {
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
this.testFocus2 = false;
|
||||
});
|
||||
|
||||
if (this.StoreStationName == '') {
|
||||
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_StoreYarnCreateInBillMaster',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillTypeID',
|
||||
value: '9'
|
||||
},
|
||||
{
|
||||
name: '@StoreNameID',
|
||||
value: this.StoreNameID
|
||||
},
|
||||
{
|
||||
name: '@StoreStationNo',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@InStoreBillNo',
|
||||
value: this.InStoreBillNo
|
||||
},
|
||||
{
|
||||
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.InStoreMasterNo = aResultData.InStoreMasterNo;
|
||||
this.InStoreBillNo = aResultData.InStoreBillNo;
|
||||
this.InStoreBillID = parseInt(aResultData.InStoreBillID);
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = 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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
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_GetStoreYarnInDetailSQL',
|
||||
params: [{
|
||||
name: 'BillID',
|
||||
value: this.InStoreBillID
|
||||
},{
|
||||
name: 'BillNo',
|
||||
value: this.InStoreBillNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("--->>>" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
this.YarnBillSumRoll = 0;
|
||||
this.YarnBillSumNetQty= 0;
|
||||
this.YarnBillSumGrossQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnGoodsDetailDataList.push(aResultData[i]);
|
||||
this.InStoreBillID = aResultData[i].BillMasterID;
|
||||
this.YarnBillSumRoll = this.YarnBillSumRoll + parseFloat(aResultData[i].Roll);
|
||||
this.YarnBillSumGrossQty = this.YarnBillSumGrossQty + parseFloat(aResultData[i].GrossQty);
|
||||
this.YarnBillSumNetQty = this.YarnBillSumNetQty + parseFloat(aResultData[i].NetQty);
|
||||
};
|
||||
this.YarnBillSumGrossQty = this.YarnBillSumGrossQty.toFixed(2);
|
||||
this.YarnBillSumNetQty = this.YarnBillSumNetQty.toFixed(2);
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
CreateNewBillDetail() {
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
|
||||
if (this.StoreNameID == 0 && this.InStoreMasterNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + aStrBarCode + "<----" + this.InStoreBillID);
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateInBillDetail',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.InStoreBillID
|
||||
},
|
||||
{
|
||||
name: '@BillTypeID',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnGoodsName = aResultData.YarnGoodsName;
|
||||
this.YarnGoodsCodeName = aResultData.YarnGoodsCodeName;
|
||||
this.YarnCrockNoRoll = parseFloat(aResultData.YarnCrockNoRoll);
|
||||
this.YarnCrockNoGrossQty = parseFloat(aResultData.YarnCrockNoGrossQty);
|
||||
this.YarnCrockNoNetQty = parseFloat(aResultData.YarnCrockNoNetQty);
|
||||
this.YarnBillSumRoll = parseFloat(aResultData.YarnBillSumRoll);
|
||||
this.YarnBillSumGrossQty = parseFloat(aResultData.YarnBillSumGrossQty);
|
||||
this.YarnBillSumNetQty = parseFloat(aResultData.YarnBillSumNetQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
if (this.ViewDetailStatus == true){
|
||||
this.GetDetailListData();
|
||||
}
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '入仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
button {
|
||||
margin-top: 30upx;
|
||||
margin-bottom: 30upx;
|
||||
}
|
||||
|
||||
.button-sp-area {
|
||||
margin: 0 auto;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.mini-btn {
|
||||
margin-right: 10upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<!--u-form :model="model" :rules="rules" ref="uForm" :errorType="errorType"-->
|
||||
<u-form :model="model" ref="uForm">
|
||||
<u-form-item label-width="150" label="扫描仓位:">
|
||||
<input type="text" v-model="model.stationStationNo" :focus="testFocus0" style="width:100px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:80px;">名称:{{model.stationStationName}}</text>
|
||||
<!--u-icon slot="right" name="scan" @tap="scanStoreStationNo"></u-icon-->
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料名称:">
|
||||
<u-input v-model="model.YarnGoodsName" type="text" />
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="色号颜色:">
|
||||
<u-input v-model="model.YarnGoodsCodeNoName" type="text" />
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="缸号资料:">
|
||||
<u-input v-model="model.YarnCrockNo" type="text" />
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="每包个数:">
|
||||
<u-input v-model="model.YarnGrossQty" type="text" />
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料毛重:">
|
||||
<u-input v-model="model.YarnGrossQty" type="text" />
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料净重:">
|
||||
<u-input v-model="model.YarnNetQty" type="text" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<u-row gutter="32" class="bottom-box" justify="center">
|
||||
<u-col span="10">
|
||||
<view><u-button type="primary" shape="circle" @click="navTo('/pages/sys/home/index')">提交</u-button></view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import util, {
|
||||
parFabricGoodsBarCode2D,
|
||||
playAppRightAudio,
|
||||
playAppErrorAudio
|
||||
} from '../../common/util';
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
testFocus0: true, // TODO: 修改正确的变量名, 暂时未测试名字
|
||||
testFocus1: false,
|
||||
model: {
|
||||
stationStationNo:'',
|
||||
stationStationName: '',
|
||||
YarnGoodsNo:'',
|
||||
YarnGoodsName:'',
|
||||
YarnGoodsCodeNo:'',
|
||||
YarnGoodsCodeName:'',
|
||||
YarnGoodsCodeNoName:'',
|
||||
YarnCrockNo:'',
|
||||
YarnBoxBillNo:'',
|
||||
yarnBoxRoll:'', //每箱个数
|
||||
YarnRoll:'',
|
||||
YarnGrossQty:'',
|
||||
YarnNetQty:'',
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
|
||||
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.model.stationStationNo,
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("---->" + res.data.toString());
|
||||
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.StoreNameID = parseInt(aResultData[i].StoreNameID);
|
||||
};
|
||||
if (this.DyeBackCheckStatus)
|
||||
{
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = false;
|
||||
this.testFocus0 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
this.testFocus0 = false;
|
||||
this.testFocus2 = false;
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationNo = "";
|
||||
this.StoreStationName = "",
|
||||
this.StoreNameID = 0,
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = false;
|
||||
});
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
if (e.length > 0) {
|
||||
this.model.stationStationNo = e[0].value;
|
||||
}
|
||||
},
|
||||
scanStoreStationNo() {
|
||||
uni.scanCode({
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: res => {
|
||||
this.model.stationStationNo = res.result;
|
||||
this.model.stationStationName = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.wrap {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.agreement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.agreement-text {
|
||||
padding-left: 8rpx;
|
||||
color: $u-tips-color;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,468 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label-width="150" label="调至仓位:">
|
||||
<input type="text" v-model="StoreStationNo" :focus="testFocus0" style="width:80px;" @confirm="GetStoreStationName" />
|
||||
<text class="title" style="width:80px;">名称:{{StoreStationName}}</text>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearBillData">清空数据</button>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料名称:">
|
||||
<text class="title" style="width:150px;">{{YarnGoodsName}}</text>
|
||||
<text class="title" style="width:150px;">缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="色号颜色:">
|
||||
<text class="title" style="width:200px;">{{YarnGoodsCodeNo}} {{YarnGoodsCodeName}} {{YarnGoodsColorNo}}</text>
|
||||
<checkbox-group @change="ViewDetailChange">
|
||||
<checkbox ref="checkBoxRef" :checked="ViewDetailStatus">显示明细</checkbox>
|
||||
</checkbox-group>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">箱号:{{YarnBoxBillNo}}</text>
|
||||
<text class="title" style="width:90px;">个数:{{YarnBoxRoll}}</text>
|
||||
<text class="title" style="width:90px;">毛重:{{YarnGrossQty}}</text>
|
||||
<text class="title" style="width:90px;">净重:{{YarnNetQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus2" style="width:250px;"
|
||||
@confirm="CreateMoveStoreStation" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:110px;">缸号件数:{{YarnCrockNoRoll}}</text>
|
||||
<text class="title" style="width:140px;">缸号毛重:{{YarnCrockNoGrossQty}}</text>
|
||||
<text class="title" style="width:140px;">缸号净重:{{YarnCrockNoNetQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:110px;">仓位件数:{{YarnBillSumRoll}}</text>
|
||||
<text class="title" style="width:140px;">仓位毛重:{{YarnBillSumGrossQty}}</text>
|
||||
<text class="title" style="width:140px;">仓位净重:{{YarnBillSumNetQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnGoodsDetailDataList"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
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,
|
||||
YarnDetailList: [],
|
||||
QRBarCode: '',
|
||||
InStoreBillID: 0,
|
||||
InStoreBillNo: '',
|
||||
InStoreMasterNo: '',
|
||||
StoreNameID: 0,
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
DyeWorksDigCode: 0,
|
||||
YarnGoodsNo: '',
|
||||
YarnGoodsName: '',
|
||||
YarnGoodsCodeNo: '',
|
||||
YarnGoodsCodeName: '',
|
||||
YarnGoodsColorNo: '',
|
||||
YarnCrockNo: '',
|
||||
YarnBoxBillNo: '',
|
||||
YarnBoxRoll: '', //每箱个数
|
||||
YarnRoll: '',
|
||||
YarnGrossQty: '',
|
||||
YarnNetQty: '',
|
||||
YarnCrockNoRoll: '',
|
||||
YarnCrockNoGrossQty: '',
|
||||
YarnCrockNoNetQty: '',
|
||||
YarnBillSumRoll: '',
|
||||
YarnBillSumGrossQty: '',
|
||||
YarnBillSumNetQty: '',
|
||||
testFocus0: true, // TODO: 修改正确的变量名, 暂时未测试名字
|
||||
testFocus1: false,
|
||||
testFocus2: false,
|
||||
ViewDetailStatus: true,
|
||||
BillDataMessage: '',
|
||||
YarnGoodsDetailDataList:[],
|
||||
headersMaster: [{
|
||||
label: '名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
ViewDetailChange: function() {
|
||||
this.ViewDetailStatus = !this.ViewDetailStatus;
|
||||
if (this.ViewDetailStatus==true)
|
||||
{
|
||||
this.GetDetailListData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
}
|
||||
},
|
||||
borderColorChange(index) {
|
||||
this.borderColor = index == 0 ? '#e4e7ed' : index == 1 ? '#2979ff' : '#ff9900';
|
||||
},
|
||||
alignChange(index) {
|
||||
this.align = index == 0 ? 'left' : index == 1 ? 'center' : 'right';
|
||||
},
|
||||
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.StoreNameID = parseInt(aResultData[i].StoreNameID);
|
||||
};
|
||||
this.GetDetailListData();
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
this.testFocus0 = false;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.StoreStationName = "",
|
||||
this.StoreNameID = 0,
|
||||
this.BillDataMessage = '不存在当前的仓位资料,请确认!';
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.BillDataMessage = '连接服务器出错,请检查后台服务是否启动!' + res.data.msg;
|
||||
},
|
||||
})
|
||||
},
|
||||
ClearBillData: function() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.YarnDetailList = [];
|
||||
this.QRBarCode = "";
|
||||
this.InStoreBillID = 0;
|
||||
this.InStoreBillNo = "";
|
||||
this.InStoreMasterNo = "";
|
||||
this.StoreNameID = 0;
|
||||
this.StoreStationNo = "";
|
||||
this.StoreStationName = "";
|
||||
this.DyeWorksDigCode = 0;
|
||||
this.YarnGoodsNo = "";
|
||||
this.YarnGoodsName = "";
|
||||
this.YarnGoodsCodeNo = "";
|
||||
this.YarnGoodsCodeName = "";
|
||||
this.YarnGoodsColorNo = "";
|
||||
this.YarnCrockNo = "";
|
||||
this.YarnBoxBillNo = "";
|
||||
this.YarnBoxRoll = "";
|
||||
this.YarnRoll = "";
|
||||
this.YarnGrossQty = "";
|
||||
this.YarnNetQty = "";
|
||||
this.YarnCrockNoRoll = "";
|
||||
this.YarnCrockNoGrossQty = "";
|
||||
this.YarnCrockNoNetQty = "";
|
||||
this.YarnBillSumRoll = 0;
|
||||
this.YarnBillSumGrossQty = 0;
|
||||
this.YarnBillSumNetQty = 0;
|
||||
this.BillDataMessage = "";
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
/*
|
||||
this.StoreStationNo = "";
|
||||
this.BillNo = "";
|
||||
this.StoreStationName = "";
|
||||
this.FabricGoodsNo = "";
|
||||
this.FabricGoodsName = "";
|
||||
this.GoodsCodeNo = "";
|
||||
this.GoodsCodeName = "";
|
||||
this.CrockNo = "";
|
||||
this.GoodsBillNo = "";
|
||||
this.BarCodeDig = "";
|
||||
this.BarCodeQty = "";
|
||||
this.CrockNoSumRoll = "";
|
||||
this.CrockNoSumQty = "";
|
||||
this.StationNameSumRoll = "";
|
||||
this.StationNameSumQty = "";
|
||||
this.BillSumRoll = "";
|
||||
this.BillSumQty = "";
|
||||
this.BarCode = '';
|
||||
*/
|
||||
},
|
||||
|
||||
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_GetStoreYarnStoreStationDetailSQL',
|
||||
params: [{
|
||||
name: 'StationName',
|
||||
value: this.StoreStationName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("--->>>" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
this.YarnBillSumRoll = 0;
|
||||
this.YarnBillSumNetQty= 0;
|
||||
this.YarnBillSumGrossQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnGoodsDetailDataList.push(aResultData[i]);
|
||||
this.InStoreBillID = aResultData[i].BillMasterID;
|
||||
this.YarnBillSumRoll = this.YarnBillSumRoll + parseFloat(aResultData[i].Roll);
|
||||
this.YarnBillSumGrossQty = this.YarnBillSumGrossQty + parseFloat(aResultData[i].GrossQty);
|
||||
this.YarnBillSumNetQty = this.YarnBillSumNetQty + parseFloat(aResultData[i].NetQty);
|
||||
};
|
||||
this.YarnBillSumGrossQty = this.YarnBillSumGrossQty.toFixed(2);
|
||||
this.YarnBillSumNetQty = this.YarnBillSumNetQty.toFixed(2);
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
CreateMoveStoreStation() {
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
|
||||
if (this.StoreNameID == 0 && this.InStoreMasterNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + aStrBarCode + "<----" + this.InStoreBillID);
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_StoreYarnCreateMoveStation',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.InStoreBillID
|
||||
},
|
||||
{
|
||||
name: '@BillTypeID',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: this.StoreStationNo
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnGoodsName = aResultData.YarnGoodsName;
|
||||
this.YarnGoodsCodeName = aResultData.YarnGoodsCodeName;
|
||||
this.YarnCrockNoRoll = parseFloat(aResultData.YarnCrockNoRoll);
|
||||
this.YarnCrockNoGrossQty = parseFloat(aResultData.YarnCrockNoGrossQty);
|
||||
this.YarnCrockNoNetQty = parseFloat(aResultData.YarnCrockNoNetQty);
|
||||
this.YarnBillSumRoll = parseFloat(aResultData.YarnBillSumRoll);
|
||||
this.YarnBillSumGrossQty = parseFloat(aResultData.YarnBillSumGrossQty);
|
||||
this.YarnBillSumNetQty = parseFloat(aResultData.YarnBillSumNetQty);
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
if (this.ViewDetailStatus == true){
|
||||
this.GetDetailListData();
|
||||
}
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '入仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
this.BillDataMessage = '入仓出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
button {
|
||||
margin-top: 30upx;
|
||||
margin-bottom: 30upx;
|
||||
}
|
||||
|
||||
.button-sp-area {
|
||||
margin: 0 auto;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.mini-btn {
|
||||
margin-right: 10upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,449 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<u-form ref="uForm">
|
||||
<u-form-item label-width="150" label="配纱单号:">
|
||||
<input type="text" v-model="OutStoreBillNo" :focus="testFocus0" style="width:100px;" @confirm="GetDetailListData" />
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="CreateStoreYarnOutBill">生成出仓</button>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="ClearBillData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="原料名称:">
|
||||
<text class="title" style="width:150px;">{{YarnGoodsName}}</text>
|
||||
<text class="title" style="width:150px;">缸号:{{YarnCrockNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="色号颜色:">
|
||||
<text class="title" style="width:300px;">{{YarnGoodsCodeNo}} {{YarnGoodsCodeName}} {{YarnGoodsColorNo}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:80px;">箱号:{{YarnBoxBillNo}}</text>
|
||||
<text class="title" style="width:90px;">个数:{{YarnBoxRoll}}</text>
|
||||
<text class="title" style="width:90px;">毛重:{{YarnGrossQty}}</text>
|
||||
<text class="title" style="width:90px;">净重:{{YarnNetQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label-width="150" label="条码资料:">
|
||||
<input type="text" v-model="QRBarCode" :focus="testFocus1" style="width:250px;"
|
||||
@confirm="CreateNewBillDetail" />
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title">{{BillDataMessage}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">需求件数:{{YarnPlanRoll}}</text>
|
||||
<text class="title" style="width:200px;">需求重量:{{YarnPlanQty}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<text class="title" style="width:200px;">已扫件数:{{YarnScanRoll}}</text>
|
||||
<text class="title" style="width:200px;">已扫重量:{{YarnScanQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnGoodsDetailDataList"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
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,
|
||||
YarnDetailList: [],
|
||||
QRBarCode: '',
|
||||
OutStoreBillID: 0,
|
||||
OutStoreBillNo: '',
|
||||
OutStoreMasterNo: '',
|
||||
StoreNameID: 0,
|
||||
StoreStationNo: '',
|
||||
StoreStationName: '',
|
||||
DyeWorksDigCode: 0,
|
||||
YarnGoodsNo: '',
|
||||
YarnGoodsName: '',
|
||||
YarnGoodsCodeNo: '',
|
||||
YarnGoodsCodeName: '',
|
||||
YarnGoodsColorNo: '',
|
||||
YarnCrockNo: '',
|
||||
YarnBoxBillNo: '',
|
||||
YarnBoxRoll: '', //每箱个数
|
||||
YarnRoll: '',
|
||||
YarnGrossQty: '',
|
||||
YarnNetQty: '',
|
||||
YarnPlanRoll: 0,
|
||||
YarnPlanQty: 0,
|
||||
YarnScanRoll: 0,
|
||||
YarnScanQty: 0,
|
||||
testFocus0: true, // TODO: 修改正确的变量名, 暂时未测试名字
|
||||
testFocus1: false,
|
||||
testFocus2: false,
|
||||
BillDataMessage: '',
|
||||
YarnGoodsDetailDataList:[],
|
||||
headersMaster: [{
|
||||
label: '名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
},{
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
},{
|
||||
label: '缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '扫描件数',
|
||||
key: 'YarnScanRoll'
|
||||
}, {
|
||||
label: '扫描重量',
|
||||
key: 'YarnScanQty'
|
||||
},{
|
||||
label: '件数',
|
||||
key: 'YarnPlanRoll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'YarnPlanQty'
|
||||
}],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
playSuccess() {
|
||||
util.playSuccessAudio();
|
||||
},
|
||||
playError() {
|
||||
util.playErrorAudio();
|
||||
},
|
||||
borderColorChange(index) {
|
||||
this.borderColor = index == 0 ? '#e4e7ed' : index == 1 ? '#2979ff' : '#ff9900';
|
||||
},
|
||||
alignChange(index) {
|
||||
this.align = index == 0 ? 'left' : index == 1 ? 'center' : 'right';
|
||||
},
|
||||
|
||||
ClearBillData: function() {
|
||||
this.testFocus0 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = true;
|
||||
});
|
||||
this.YarnGoodsDetailDataList = [],
|
||||
this.QRBarCode = '',
|
||||
this.OutStoreBillID = 0,
|
||||
this.OutStoreBillNo = '',
|
||||
this.OutStoreMasterNo = '',
|
||||
this.StoreNameID = 0,
|
||||
this.StoreStationNo = '',
|
||||
this.StoreStationName = '',
|
||||
this.DyeWorksDigCode = 0,
|
||||
this.YarnGoodsNo = '',
|
||||
this.YarnGoodsName = '',
|
||||
this.YarnGoodsCodeNo = '',
|
||||
this.YarnGoodsCodeName = '',
|
||||
this.YarnGoodsColorNo = '',
|
||||
this.YarnCrockNo = '',
|
||||
this.YarnBoxBillNo = '',
|
||||
this.YarnBoxRoll = '',
|
||||
this.YarnRoll = '',
|
||||
this.YarnGrossQty = '',
|
||||
this.YarnNetQty = '',
|
||||
this.YarnPlanRoll = 0,
|
||||
this.YarnPlanQty = 0,
|
||||
this.YarnScanRoll = 0,
|
||||
this.YarnScanQty = 0
|
||||
},
|
||||
|
||||
CreateStoreYarnOutBill() {
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = true;
|
||||
this.testFocus2 = false;
|
||||
});
|
||||
|
||||
if (this.OutStoreBillID == 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_ProductPlanYarnOutCreateBill',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.OutStoreBillID
|
||||
},
|
||||
{
|
||||
name: '@BillNo',
|
||||
value: this.OutStoreBillNo
|
||||
},
|
||||
{
|
||||
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.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = 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;
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
GetDetailListData: function() {
|
||||
console.log("-----<<<<<<>>>>");
|
||||
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_GetStoreYarnPlanOutDetailSQL',
|
||||
params: [{
|
||||
name: 'BillNo',
|
||||
value: this.OutStoreBillNo
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("--->>>" + JSON.stringify(res.data));
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.playSuccess();
|
||||
var aResultData = res.data.data;
|
||||
this.YarnPlanRoll = 0;
|
||||
this.YarnPlanQty = 0;
|
||||
this.YarnScanRoll = 0;
|
||||
this.YarnScanQty = 0;
|
||||
this.YarnGoodsDetailDataList = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnGoodsDetailDataList.push(aResultData[i]);
|
||||
this.OutStoreBillID = aResultData[i].BillMasterID;
|
||||
this.YarnPlanRoll = this.YarnPlanRoll + aResultData[i].YarnPlanRoll;
|
||||
this.YarnPlanQty = this.YarnPlanQty + aResultData[i].YarnPlanQty;
|
||||
this.YarnScanRoll = this.YarnScanRoll + aResultData[i].YarnScanRoll;
|
||||
this.YarnScanQty = this.YarnScanQty + aResultData[i].YarnScanQty;
|
||||
};
|
||||
console.log("--->" + this.YarnScanRoll + "<>" + this.YarnScanQty);
|
||||
console.log("--->" + this.OutStoreBillID + "<>" + this.YarnPlanRoll);
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.playError();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.testFocus1 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus1 = true;
|
||||
});
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
CreateNewBillDetail() {
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
|
||||
if (this.StoreNameID == 0 && this.InStoreMasterNo == '') {
|
||||
this.playError();
|
||||
this.BillDataMessage = '请先新增单据';
|
||||
return;
|
||||
}
|
||||
|
||||
var aStrBarCode = parYarnGoodsBarCode2D(this.QRBarCode);
|
||||
aStrBarCode = aStrBarCode.trimRight().trimLeft();
|
||||
if (aStrBarCode == '') {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = true;
|
||||
this.BillDataMessage = '无效的二维码!';
|
||||
return;
|
||||
}
|
||||
console.log("-------->" + this.OutStoreBillID + "<----");
|
||||
var aBarCodeList = aStrBarCode.split(',');
|
||||
this.DyeWorksDigCode = aBarCodeList[0];
|
||||
this.YarnGoodsCodeNo = aBarCodeList[2];
|
||||
this.YarnGoodsColorNo = aBarCodeList[3];
|
||||
this.YarnCrockNo = aBarCodeList[5];
|
||||
this.YarnBoxBillNo = aBarCodeList[6];
|
||||
this.YarnBoxRoll = aBarCodeList[7];
|
||||
this.YarnGrossQty = aBarCodeList[8];
|
||||
this.YarnNetQty = aBarCodeList[9];
|
||||
uni.request({
|
||||
url: util.apiurl + 'rest/db/storedproc',
|
||||
data: {
|
||||
token: getApp().globalData.Token,
|
||||
data: {
|
||||
db_name: getApp().globalData.AppDBName,
|
||||
proc_name: 'Usp_APP_ProductPlanYarnOutScan',
|
||||
method: 'open_proc',
|
||||
params: [{
|
||||
name: '@BillID',
|
||||
value: this.OutStoreBillID
|
||||
},
|
||||
{
|
||||
name: '@BillTypeID',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
name: '@StoreStationName',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
name: '@QRBarCode',
|
||||
value: aStrBarCode
|
||||
},
|
||||
{
|
||||
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.YarnGoodsName = aResultData.YarnGoodsName;
|
||||
this.YarnGoodsCodeName = aResultData.YarnGoodsCodeName;
|
||||
this.YarnPlanRoll = aResultData.YarnPlanRoll;
|
||||
this.YarnPlanQty = aResultData.YarnPlanQty;
|
||||
this.YarnScanRoll = aResultData.YarnScanRoll;
|
||||
this.YarnScanQty = aResultData.YarnScanQty;
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描成功!';
|
||||
this.GetDetailListData();
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
} else {
|
||||
this.playError();
|
||||
this.BillDataMessage = '扫描出仓出错,' + aResultData.BillDataMessage;
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.BillDataMessage = '扫描出仓出错,' + res.data.msg;
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
this.playError();
|
||||
this.QRBarCode = '';
|
||||
this.testFocus2 = false;
|
||||
this.$nextTick(() => {
|
||||
this.testFocus0 = false;
|
||||
this.testFocus1 = false;
|
||||
this.testFocus2 = true;
|
||||
});
|
||||
this.BillDataMessage = '扫描出仓出错,' + res.data.msg;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
button {
|
||||
margin-top: 30upx;
|
||||
margin-bottom: 30upx;
|
||||
}
|
||||
|
||||
.button-sp-area {
|
||||
margin: 0 auto;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.mini-btn {
|
||||
margin-right: 10upx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,290 @@
|
||||
<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="ClearBillData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="YarnName" placeholder="原料名称" actionText=""></u-search>
|
||||
<u-search shape="square" v-model="YarnColorName" placeholder="原料色号" actionText=""></u-search>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="YarnCrockNo" 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;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnDataList" @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:'',
|
||||
YarnName:'',
|
||||
YarnColorName:'',
|
||||
YarnCrockNo:'',
|
||||
YarnSumRoll:0,
|
||||
YarnSumQty:0,
|
||||
YarnDataList:[],
|
||||
YarnCrockNoDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '单据日期',
|
||||
key: 'BillDate'
|
||||
}, {
|
||||
label: '单据类型',
|
||||
key: 'BillTypeName'
|
||||
}, {
|
||||
label: '仓库名称',
|
||||
key: 'StoreName'
|
||||
}, {
|
||||
label: '往来单位',
|
||||
key: 'CustomerName'
|
||||
}, {
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrockNo'
|
||||
}, {
|
||||
label: '仓位',
|
||||
key: 'StoreStationName'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '备注',
|
||||
key: 'Remark'
|
||||
}, {
|
||||
label: '总欠重',
|
||||
key: 'SumOweQty'
|
||||
}],
|
||||
|
||||
}
|
||||
},
|
||||
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 = '';
|
||||
},
|
||||
|
||||
ClearBillData: function() {
|
||||
this.StoreName = '',
|
||||
this.YarnName = '';
|
||||
this.YarnColorName = '';
|
||||
this.YarnCrockNo = '';
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
this.YarnDataList = [];
|
||||
},
|
||||
|
||||
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: '%StoreYarnEmbryo%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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_GetStoreYarnAllInSQL',
|
||||
params: [{
|
||||
name: 'SName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'YCrockNo',
|
||||
value: '%'+this.YarnCrockNo+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.YarnDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnDataList = [];
|
||||
} else {
|
||||
this.YarnDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
GetDetailCrockNoListData: function(index) {
|
||||
console.log(this.YarnDataList[index].YarnName);
|
||||
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.YarnName
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: this.YarnColorName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.YarnCrockNoDataList = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnCrockNoDataList.push(aResultData[i]);
|
||||
};
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnCrockNoDataList = [];
|
||||
} else {
|
||||
this.YarnCrockNoDataList = [];
|
||||
}
|
||||
},
|
||||
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,287 @@
|
||||
<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="ClearBillData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="YarnName" placeholder="原料名称" actionText=""></u-search>
|
||||
<u-search shape="square" v-model="YarnColorName" placeholder="原料色号" actionText=""></u-search>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="YarnCrockNo" 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;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnDataList" @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:'',
|
||||
YarnName:'',
|
||||
YarnColorName:'',
|
||||
YarnCrockNo:'',
|
||||
YarnSumRoll:0,
|
||||
YarnSumQty:0,
|
||||
YarnDataList:[],
|
||||
YarnCrockNoDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '单据日期',
|
||||
key: 'BillDate'
|
||||
}, {
|
||||
label: '单据类型',
|
||||
key: 'BillTypeName'
|
||||
}, {
|
||||
label: '仓库名称',
|
||||
key: 'StoreName'
|
||||
}, {
|
||||
label: '往来单位',
|
||||
key: 'CustomerName'
|
||||
}, {
|
||||
label: '原料名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '原料缸号',
|
||||
key: 'YarnCrocKNo'
|
||||
}, {
|
||||
label: '仓位',
|
||||
key: 'StoreStationName'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '备注',
|
||||
key: 'Remark'
|
||||
}, {
|
||||
label: '总欠重',
|
||||
key: 'SumOweQty'
|
||||
}],
|
||||
|
||||
}
|
||||
},
|
||||
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 = '';
|
||||
},
|
||||
|
||||
ClearBillData: function() {
|
||||
this.StoreName = '',
|
||||
this.YarnName = '';
|
||||
this.YarnColorName = '';
|
||||
this.YarnCrockNo = '';
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
this.YarnDataList = [];
|
||||
},
|
||||
|
||||
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: '%StoreYarnEmbryo%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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_GetStoreYarnAllOutSQL',
|
||||
params: [{
|
||||
name: 'SName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'YCrockNo',
|
||||
value: '%'+this.YarnCrockNo+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.YarnDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnDataList = [];
|
||||
} else {
|
||||
this.YarnDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
GetDetailCrockNoListData: function(index) {
|
||||
console.log(this.YarnDataList[index].YarnName);
|
||||
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.YarnName
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: this.YarnColorName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.YarnCrockNoDataList = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnCrockNoDataList.push(aResultData[i]);
|
||||
};
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnCrockNoDataList = [];
|
||||
} else {
|
||||
this.YarnCrockNoDataList = [];
|
||||
}
|
||||
},
|
||||
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,277 @@
|
||||
<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="ClearBillData">清空</button>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<u-search shape="square" v-model="YarnName" placeholder="原料名称" actionText=""></u-search>
|
||||
<u-search shape="square" v-model="YarnColorName" 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;">总件数:{{YarnSumRoll}}</text>
|
||||
<text class="title" style="width:200px;">总重量:{{YarnSumQty}}</text>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="u-demo-area">
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<wyb-table ref="table" :headers="headersMaster" :contents="YarnDataList" />
|
||||
</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:'',
|
||||
YarnName:'',
|
||||
YarnColorName:'',
|
||||
YarnSumRoll:0,
|
||||
YarnSumQty:0,
|
||||
YarnDataList:[],
|
||||
YarnCrockNoDataList:[],
|
||||
StoreNameDataList: [],
|
||||
headersMaster: [{
|
||||
label: '名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
label: '件数',
|
||||
key: 'Roll'
|
||||
}, {
|
||||
label: '重量',
|
||||
key: 'Qty'
|
||||
}, {
|
||||
label: '仓库',
|
||||
key: 'StoreName'
|
||||
}],
|
||||
headersDetail: [ {
|
||||
label: '名称',
|
||||
key: 'YarnName'
|
||||
}, {
|
||||
label: '色号',
|
||||
key: 'YarnColorNo'
|
||||
}, {
|
||||
label: '颜色',
|
||||
key: 'YarnColorName'
|
||||
}, {
|
||||
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 = '';
|
||||
},
|
||||
|
||||
ClearBillData: function() {
|
||||
this.StoreName = '',
|
||||
this.YarnName = '';
|
||||
this.YarnColorName = '';
|
||||
this.YarnCrockNo = '';
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
this.YarnDataList = [];
|
||||
},
|
||||
|
||||
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: '%StoreYarnEmbryo%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
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_GetStoreYarnMasterSQL',
|
||||
params: [{
|
||||
name: 'SName',
|
||||
value: '%'+this.StoreName+'%'
|
||||
},{
|
||||
name: 'FGNo',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'FGName',
|
||||
value: '%'+this.YarnName+'%'
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
},{
|
||||
name: 'GCName',
|
||||
value: '%'+this.YarnColorName+'%'
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
this.YarnDataList = res.data.data;
|
||||
var aResultData = res.data.data;
|
||||
this.YarnSumRoll = 0;
|
||||
this.YarnSumQty = 0;
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnSumRoll = this.YarnSumRoll + aResultData[i].Roll;
|
||||
this.YarnSumQty = this.YarnSumQty + aResultData[i].Qty;
|
||||
};
|
||||
this.YarnSumRoll = this.YarnSumRoll.toFixed(2) + '件';
|
||||
this.YarnSumQty = this.YarnSumQty.toFixed(2) + 'Kg';
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnDataList = [];
|
||||
} else {
|
||||
this.YarnDataList = [];
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '连接服务器出错,请检查后台服务是否启动!' + res.data.msg
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 5000);
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
GetDetailCrockNoListData: function(index) {
|
||||
console.log(this.YarnDataList[index].YarnName);
|
||||
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.YarnName
|
||||
},{
|
||||
name: 'GCNO',
|
||||
value: this.YarnColorName
|
||||
}]
|
||||
},
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.status == 0 && res.data.count > 0) {
|
||||
var aResultData = res.data.data;
|
||||
this.YarnCrockNoDataList = [];
|
||||
for (var i = 0; i < aResultData.length; i++) {
|
||||
this.YarnCrockNoDataList.push(aResultData[i]);
|
||||
};
|
||||
} else if (res.data.status == 0 && res.data.count <= 0) {
|
||||
this.YarnCrockNoDataList = [];
|
||||
} else {
|
||||
this.YarnCrockNoDataList = [];
|
||||
}
|
||||
},
|
||||
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