|
@@ -41,12 +41,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <ws-form>
|
|
|
- <div style="margin: 0 auto">
|
|
|
-
|
|
|
+ <ws-form class='right-content'>
|
|
|
+ <div class="left">
|
|
|
<div class="tab">
|
|
|
- <div class="tab-item" :class="index==0?'active':''" @click="tabClick(0)"> 待称毛重({{mList.length}})</div>
|
|
|
- <div class="tab-item" :class="index==1?'active':''" @click="tabClick(1)">待称皮重({{pList.length}})</div>
|
|
|
+ <div class="tab-item" :class="index==0?'active':''" @click="tabClick(0)"> 待称毛重({{mListTop.length}})</div>
|
|
|
+ <div class="tab-item" :class="index==1?'active':''" @click="tabClick(1)">待称皮重({{pListTop.length}})</div>
|
|
|
</div>
|
|
|
<div class="title">基本信息</div>
|
|
|
<ws-info-table>
|
|
@@ -67,21 +66,17 @@
|
|
|
<ws-input v-model="weighingList.carNumber" placeholder="请输入车牌号" maxlength="100" size="small" disabled />
|
|
|
</ws-form-item>
|
|
|
<ws-form-item label="箱号-1" span="1" prop="boxNo">
|
|
|
- <ws-input disabled v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20"
|
|
|
- size="small" />
|
|
|
- </ws-form-item>
|
|
|
- <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
|
|
|
- <ws-input disabled v-model="inspect.boxNoOther" placeholder="请输入箱号" maxlength="20"
|
|
|
- size="small" />
|
|
|
- </ws-form-item>
|
|
|
- <ws-form-item label="封号-1" span="1" prop="titleNo">
|
|
|
- <ws-input disabled v-model="inspect.titleNo" placeholder="请输入封号" maxlength="20"
|
|
|
- size="small" />
|
|
|
- </ws-form-item>
|
|
|
- <ws-form-item label="封号-2" span="1" prop="titleNoOther">
|
|
|
- <ws-input disabled v-model="inspect.titleNoOther" placeholder="请输入封号" maxlength="20"
|
|
|
- size="small" />
|
|
|
- </ws-form-item>
|
|
|
+ <ws-input disabled v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
|
|
|
+ <ws-input disabled v-model="inspect.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="封号-1" span="1" prop="titleNo">
|
|
|
+ <ws-input disabled v-model="inspect.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="封号-2" span="1" prop="titleNoOther">
|
|
|
+ <ws-input disabled v-model="inspect.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
<ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
<ws-input v-model="weighingList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
|
|
|
</ws-form-item>
|
|
@@ -91,13 +86,13 @@
|
|
|
size="small" :disabled="disabled" />
|
|
|
<ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight"
|
|
|
@input="calculation" placeholder="未获取到毛重" maxlength="100" size="small" disabled />
|
|
|
+ <el-button type="primary" :class="index ==0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
|
|
|
</ws-form-item>
|
|
|
- <el-button type="primary" :class="index ==0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
|
|
|
<ws-form-item label="皮重(公斤)" span="1" prop="tare" v-if="information == '皮重'">
|
|
|
<ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
|
|
|
placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
|
|
|
+ <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
|
|
|
</ws-form-item>
|
|
|
- <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
|
|
|
<div class="formItem">
|
|
|
<ws-form-item label="扣重(公斤)" span="1" prop="buckleWeightRatio"
|
|
|
v-if="information == '皮重' && paramType == '2'">
|
|
@@ -117,18 +112,20 @@
|
|
|
<el-button @click="print" v-if="this.information == '皮重'" type="primary">保存并打印</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="bottom">
|
|
|
- <el-table ref="singleTable" :data="carList" height="550" highlight-current-row
|
|
|
- @current-change="handleCurrentChange" style="width: 100%;overflow:auto">
|
|
|
+ <div class="car-right">
|
|
|
+ <el-table ref="singleTable" :data="carList" highlight-current-row @current-change="handleCurrentChange"
|
|
|
+ style="width: 100%;overflow:auto;height:680px">
|
|
|
<el-table-column property="number" label="编号">
|
|
|
</el-table-column>
|
|
|
<el-table-column property="carNumber" label="车牌号">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column property="status" label="状态">
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div style="text-align: center">
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage" :page-size="pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
|
+ :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="deptBudgetTotal">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
<!-- <div class="table-title">
|
|
@@ -187,10 +184,10 @@
|
|
|
weighingList: { //深度监听,可监听到对象、数组的变化
|
|
|
handler(val, oldVal) {
|
|
|
if (val.tare) {
|
|
|
- if(this.weighingList.buckleMiscellaneous){
|
|
|
- this.weighingList.netWeight = this.weighingList.grossWeight - val.tare - this.weighingList.buckleMiscellaneous
|
|
|
- }
|
|
|
- else{
|
|
|
+ if (this.weighingList.buckleMiscellaneous) {
|
|
|
+ this.weighingList.netWeight = this.weighingList.grossWeight - val.tare - this.weighingList
|
|
|
+ .buckleMiscellaneous
|
|
|
+ } else {
|
|
|
this.weighingList.netWeight = this.weighingList.grossWeight - val.tare
|
|
|
}
|
|
|
}
|
|
@@ -221,7 +218,7 @@
|
|
|
grossWeight: 0,
|
|
|
tare: 0,
|
|
|
buckleMiscellaneous: 0,
|
|
|
- netWeight:0
|
|
|
+ netWeight: 0
|
|
|
},
|
|
|
tpyeNo: 1,
|
|
|
disabled: true,
|
|
@@ -238,7 +235,11 @@
|
|
|
paramType: '1',
|
|
|
warehouseName: '',
|
|
|
result1: '00',
|
|
|
- allowEdit:0,
|
|
|
+ allowEdit: 0,
|
|
|
+ mListTop:[],
|
|
|
+ mListBottom:[],
|
|
|
+ pListTop:[],
|
|
|
+ pListBottom:[]
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
@@ -342,16 +343,23 @@
|
|
|
if (_list[i].paymentManagement.status != '待结算' || _list[i].paymentManagement
|
|
|
.approveStatus) {
|
|
|
continue
|
|
|
- }
|
|
|
- }
|
|
|
- if (_list[i].status == '已质检' || _list[i].status == '已称毛重') {
|
|
|
- this.mList.push(_list[i])
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- if ((_list[i].status == '已称皮重' || _list[i].status == '已称毛重')) {
|
|
|
- this.pList.push(_list[i])
|
|
|
+ if (_list[i].status == '已质检') {
|
|
|
+ this.mListTop.push(_list[i])
|
|
|
+ }
|
|
|
+ if (_list[i].status == '已称毛重') {
|
|
|
+ this.mListBottom.push(_list[i])
|
|
|
+ }
|
|
|
+ if (_list[i].status == '已称皮重') {
|
|
|
+ this.pListBottom.push(_list[i])
|
|
|
+ }
|
|
|
+ if (_list[i].status == '已称毛重') {
|
|
|
+ this.pListTop.push(_list[i])
|
|
|
}
|
|
|
}
|
|
|
+ this.mList= this.mListTop.concat(this.mListBottom)
|
|
|
+ this.pList= this.pListTop.concat(this.pListBottom)
|
|
|
if (this.information == '毛重') {
|
|
|
this.index = 0
|
|
|
this.carList = this.mList
|
|
@@ -419,6 +427,10 @@
|
|
|
}
|
|
|
},
|
|
|
tabClick(val) {
|
|
|
+ this.mListTop=[]
|
|
|
+ this.mListBottom=[]
|
|
|
+ this.pListTop=[]
|
|
|
+ this.pListBottom=[]
|
|
|
this.carWeightInfo.carNumber = ''
|
|
|
this.weighingList = []
|
|
|
this.index = val
|
|
@@ -446,7 +458,7 @@
|
|
|
},
|
|
|
async closePort() {
|
|
|
console.log('closePort');
|
|
|
- if(this.reader){
|
|
|
+ if (this.reader) {
|
|
|
this.reader.cancel()
|
|
|
}
|
|
|
},
|
|
@@ -480,7 +492,8 @@
|
|
|
// console.log("receData",receData);
|
|
|
var flag = false;
|
|
|
var flag1 = false;
|
|
|
- if (this.warehouseName && (this.warehouseName == '山东诸城迈饶库'||this.warehouseName == '克东千红库'||this.warehouseName == '鲅鱼圈祥腾库'||this.warehouseName == '哈尔滨依兰库')) {
|
|
|
+ if (this.warehouseName && (this.warehouseName == '山东诸城迈饶库' || this.warehouseName == '克东千红库' || this
|
|
|
+ .warehouseName == '鲅鱼圈祥腾库' || this.warehouseName == '哈尔滨依兰库')) {
|
|
|
for (var i = 0; i < value.length; i++) {
|
|
|
var tmp = String.fromCharCode(value[i])
|
|
|
if (tmp == '+') {
|
|
@@ -499,15 +512,14 @@
|
|
|
this.weighingList.tare = parseInt(result)
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- else if (this.warehouseName && (this.warehouseName == '顺诚粮库'||this.warehouseName == '鲅鱼圈金信库')) {
|
|
|
+ } else if (this.warehouseName && (this.warehouseName == '顺诚粮库' || this.warehouseName == '鲅鱼圈金信库')) {
|
|
|
for (var i = value.length - 1; i >= 0; i--) {
|
|
|
var tmp = String.fromCharCode(value[i])
|
|
|
console.log(tmp)
|
|
|
if (String.fromCharCode(value[0]) == '.') {
|
|
|
flag = true
|
|
|
}
|
|
|
- if (flag && result.length < 9 && tmp != '='&& tmp != '.') {
|
|
|
+ if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
|
|
|
result += tmp
|
|
|
}
|
|
|
}
|
|
@@ -521,49 +533,48 @@
|
|
|
this.weighingList.tare = parseInt(result)
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
// console.log(value)
|
|
|
- for(var i=0;i<value.length;i++){
|
|
|
+ for (var i = 0; i < value.length; i++) {
|
|
|
var tmp = String.fromCharCode(value[i])
|
|
|
-
|
|
|
- if((value[0] != 49 && value[0] != 2)){
|
|
|
- if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
+
|
|
|
+ if ((value[0] != 49 && value[0] != 2)) {
|
|
|
+ if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
|
|
|
flag1 = true
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- if (tmp == String.fromCharCode(32) ) {
|
|
|
+ if (tmp == String.fromCharCode(32)) {
|
|
|
flag = true
|
|
|
}
|
|
|
- if (flag && result.length < 7 && tmp != String.fromCharCode(32)&&!(value[value.length-1] == 48&&value[value.length-2] == 48)) {
|
|
|
+ if (flag && result.length < 7 && tmp != String.fromCharCode(32) && !(value[value.length - 1] == 48 &&
|
|
|
+ value[value.length - 2] == 48)) {
|
|
|
result += tmp
|
|
|
}
|
|
|
if (flag1 && tmp != String.fromCharCode(32)) {
|
|
|
- if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
- if(i == 0 ){
|
|
|
+ if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
|
|
|
+ if (i == 0) {
|
|
|
this.result1 = tmp + '0'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (this.tpyeNo != 2) {
|
|
|
- console.log(parseInt(result)+''+parseInt(this.result1))
|
|
|
+ console.log(parseInt(result) + '' + parseInt(this.result1))
|
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
|
- this.weighingList.grossWeight = parseInt(result+this.result1)
|
|
|
+ this.weighingList.grossWeight = parseInt(result + this.result1)
|
|
|
}
|
|
|
- if (parseInt(result) == 0&&parseInt(this.result1) == 0) {
|
|
|
- this.weighingList.grossWeight = 0
|
|
|
+ if (parseInt(result) == 0 && parseInt(this.result1) == 0) {
|
|
|
+ this.weighingList.grossWeight = 0
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
|
- this.weighingList.tare = parseInt(result+this.result1)
|
|
|
+ this.weighingList.tare = parseInt(result + this.result1)
|
|
|
}
|
|
|
- if (parseInt(result) == 0&&parseInt(this.result1) == 0) {
|
|
|
- this.weighingList.tare = 0
|
|
|
+ if (parseInt(result) == 0 && parseInt(this.result1) == 0) {
|
|
|
+ this.weighingList.tare = 0
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -577,8 +588,8 @@
|
|
|
}
|
|
|
},
|
|
|
cancel() {
|
|
|
-
|
|
|
- if(this.reader){
|
|
|
+
|
|
|
+ if (this.reader) {
|
|
|
this.reader.cancel()
|
|
|
}
|
|
|
this.$router.push({
|
|
@@ -631,6 +642,9 @@
|
|
|
// })
|
|
|
},
|
|
|
print() {
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
if (!this.weighingList.grossWeight) {
|
|
|
this.$message({
|
|
|
message: '毛重不能为空',
|
|
@@ -720,7 +734,7 @@
|
|
|
//毛检保存前进行校验
|
|
|
getamount({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- customerNumberCard:this.weighingList.customerNumberCard,
|
|
|
+ customerNumberCard: this.weighingList.customerNumberCard,
|
|
|
goodsName: this.weighingList.goodsName,
|
|
|
})
|
|
|
.toPromise()
|
|
@@ -758,7 +772,7 @@
|
|
|
grossWeight(this.weighingList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- if(this.reader){
|
|
|
+ if (this.reader) {
|
|
|
this.reader.cancel()
|
|
|
}
|
|
|
this.$notify.success({
|
|
@@ -787,7 +801,7 @@
|
|
|
tare(this.weighingList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- if(this.reader){
|
|
|
+ if (this.reader) {
|
|
|
this.reader.cancel()
|
|
|
}
|
|
|
this.$notify.success({
|
|
@@ -831,10 +845,11 @@
|
|
|
|
|
|
.ws-info-table {
|
|
|
border: none;
|
|
|
+ height: 610px;
|
|
|
}
|
|
|
|
|
|
.ws-info-table .el-form-item {
|
|
|
- width: 50%;
|
|
|
+ width: 100%;
|
|
|
border: none;
|
|
|
}
|
|
|
|
|
@@ -875,6 +890,8 @@
|
|
|
}
|
|
|
|
|
|
.substance {
|
|
|
+ padding-bottom: 20px;
|
|
|
+ overflow-y: scroll;
|
|
|
.active {
|
|
|
background: #5878e8;
|
|
|
color: white;
|
|
@@ -882,9 +899,9 @@
|
|
|
|
|
|
// background: #ffffff;
|
|
|
width: 100%;
|
|
|
+ height: calc(100vh - 125px);
|
|
|
border-radius: 4px;
|
|
|
margin: 0 auto;
|
|
|
- padding-top: 20px;
|
|
|
display: flex;
|
|
|
|
|
|
.left {
|
|
@@ -929,10 +946,10 @@
|
|
|
}
|
|
|
|
|
|
.right {
|
|
|
- width: 60%;
|
|
|
+ width: 70%;
|
|
|
padding: 20px;
|
|
|
+ height: 750px;
|
|
|
background: white;
|
|
|
- margin-right: 20px;
|
|
|
border-radius: 10px;
|
|
|
|
|
|
.tab {
|
|
@@ -982,8 +999,9 @@
|
|
|
font-size: 16px;
|
|
|
// background: #f6f7fc;
|
|
|
}
|
|
|
- /deep/.el-table td{
|
|
|
- background: #e7e8ef;
|
|
|
+
|
|
|
+ /deep/.el-table td {
|
|
|
+ background: #e7e8ef;
|
|
|
}
|
|
|
|
|
|
/deep/.el-table--enable-row-transition .el-table__body td {
|
|
@@ -1039,4 +1057,27 @@
|
|
|
.weight {
|
|
|
font-size: 68px;
|
|
|
}
|
|
|
+
|
|
|
+ .right-content {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .left {
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .but {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .left,
|
|
|
+ .right {
|
|
|
+ width: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .car-right{
|
|
|
+ width: 50%;
|
|
|
+ }
|
|
|
</style>
|