子卷出入站
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !checkArr.length || checkArr.length > 1}" :disabled="disabled1" @tap="_needVehicle">呼叫载具</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !checkArr.length}" :disabled="disabled2" @tap="_shippingConfirm">配送确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val3}" :disabled="disabled3" @tap="_returnVehicle">载具送回</button>
|
||||
<button class="submit-button" @tap="_queryMaterialInfo">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -96,7 +97,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryMaterialInfo3, needVehicle, shippingConfirm} from '@/utils/getData2.js'
|
||||
import {queryProductArea, queryMaterialInfo3, needVehicle, shippingConfirm, returnVehicle} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -112,6 +113,7 @@
|
||||
dataList: [],
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
checkArr: []
|
||||
};
|
||||
},
|
||||
@@ -142,6 +144,7 @@
|
||||
})
|
||||
}
|
||||
this.dataList = [...res.data]
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
/** 呼叫载具 */
|
||||
async _needVehicle () {
|
||||
@@ -183,6 +186,28 @@
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
/** 载具送回 */
|
||||
async _returnVehicle () {
|
||||
this.disabled3 = true
|
||||
if (!this.val3) {
|
||||
uni.showToast({
|
||||
title: '请输入起点',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await returnVehicle(this.val3)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled3 = false
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.mfg_order_name === pkId}">
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.container_name === pkId}">
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td>{{e.mfg_order_name}}</td>
|
||||
<td>{{e.container_name}}</td>
|
||||
@@ -59,7 +59,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_inConfirm">上空轴</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !index1 || !pkId}" :disabled="disabled" @tap="_inConfirm">上空轴</button>
|
||||
<button class="submit-button" @tap="_queryMaterialInfo">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -124,6 +124,14 @@
|
||||
/** 确认 */
|
||||
async _inConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '点位不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
@@ -143,8 +151,8 @@
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.mfg_order_name ? '' : e.mfg_order_name
|
||||
this.pkObj = this.pkId === e.mfg_order_name ? e : {}
|
||||
this.pkId = this.pkId === e.container_name ? '' : e.container_name
|
||||
this.pkObj = this.pkId === e.container_name ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,16 +78,39 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !checkArr.length}" :disabled="disabled" @tap="_outConfirm">子卷出站</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !index1 || !checkArr.length}" :disabled="disabled1" @tap="_outConfirm">子卷出站</button>
|
||||
<button class="submit-button" @tap="showModal">出站配送</button>
|
||||
<button class="submit-button" @tap="_queryMaterialInfo">查询</button>
|
||||
</view>
|
||||
<view v-if="active" class="msg_wrapper">
|
||||
<view class="msg_box">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">区域</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">缓存点位</view>
|
||||
<view class="filter_input_wraper">
|
||||
<uni-data-select v-model="index4" :localdata="options4" @change="selectChange4"></uni-data-select>
|
||||
</view>
|
||||
<view class="filter_search" @tap="_conveyPointQuery">查询</view>
|
||||
</view>
|
||||
<view class="msg_btns">
|
||||
<button class="submit-button msg_btn" @tap="cancleModal">取消</button>
|
||||
<button class="submit-button msg_btn" :class="{'btn-disabled': !index4}" :disabled="disabled2" @tap="_conveyConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="active" class="msg_mask"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {devicePointQuery, queryProductArea, queryMaterialInfo4, outConfirm} from '@/utils/getData2.js'
|
||||
import {devicePointQuery, queryProductArea, queryMaterialInfo4, outConfirm, conveyPointQuery, conveyConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -100,10 +123,16 @@
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
options3: [],
|
||||
index3: '',
|
||||
options4: [],
|
||||
index4: '',
|
||||
isV: '0',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
checkArr: []
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
checkArr: [],
|
||||
active: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
@@ -122,6 +151,12 @@
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
selectChange3(e) {
|
||||
this.index3 = e
|
||||
},
|
||||
selectChange4(e) {
|
||||
this.index4 = e
|
||||
},
|
||||
/** 点位下拉框查询 */
|
||||
async _devicePointQuery () {
|
||||
if (!this.val1) {
|
||||
@@ -138,20 +173,29 @@
|
||||
async _queryProductArea () {
|
||||
let res = await queryProductArea()
|
||||
this.options2 = [...res.data]
|
||||
this.options3 = [...res.data]
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _queryMaterialInfo () {
|
||||
let res = await queryMaterialInfo4(this.val1, this.index2)
|
||||
let res = await queryMaterialInfo4(this.index2)
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
/** 确认 */
|
||||
/** 子卷出站 */
|
||||
async _outConfirm () {
|
||||
this.disabled = true
|
||||
this.disabled1 = true
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '点位不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
if (!this.checkArr.length) {
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
@@ -160,17 +204,61 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
this.checkArr = []
|
||||
this.isV = '0'
|
||||
this._queryMaterialInfo()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
/** 缓存点位查询 */
|
||||
async _conveyPointQuery () {
|
||||
let res = await conveyPointQuery(this.index3)
|
||||
this.options4 = [...res.data]
|
||||
},
|
||||
/** 显示弹窗 */
|
||||
showModal () {
|
||||
this.active = true
|
||||
this.index3 = this.index2
|
||||
},
|
||||
cancleModal () {
|
||||
this.disabled2 = false
|
||||
this.index3 = ''
|
||||
this.index4 = ''
|
||||
this.active = false
|
||||
},
|
||||
/** 出站配送接口 */
|
||||
async _conveyConfirm () {
|
||||
this.disabled2 = true
|
||||
if (!this.index4) {
|
||||
uni.showToast({
|
||||
title: '请选择缓存点位',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await conveyConfirm(this.index4)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2 = false
|
||||
this.index3 = ''
|
||||
this.index4 = ''
|
||||
this.active = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
this.index3 = ''
|
||||
this.index4 = ''
|
||||
this.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="_stPrint">补码</button>
|
||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -96,7 +97,7 @@
|
||||
this._boxQuery(e)
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _boxQuery () {
|
||||
async _boxQuery (e) {
|
||||
let res = await boxQuery(e, '2')
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_stConfirm">入库确认</button>
|
||||
<button class="submit-button" @tap="_boxQuery(val1)">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {handRequest} from '@/utils/api.js'
|
||||
// import {handRequest} from '@/utils/getData2.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<script>
|
||||
import {getCLodop, getPrinterList} from "@/utils/CLodopfuncs.js"
|
||||
import { RSAencrypt } from '@/utils/jsencrypt.js'
|
||||
import {handLogin} from '@/utils/api.js'
|
||||
import {handLogin} from '@/utils/getData2.js'
|
||||
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
||||
export default {
|
||||
data() {
|
||||
@@ -44,13 +44,114 @@
|
||||
plus.runtime.getProperty(plus.runtime.appid, (info) => {
|
||||
this.version = info.version;
|
||||
this.versionCode = info.versionCode ;
|
||||
if (Number(this.versionCode) < 102) {
|
||||
if (Number(this.versionCode) < 103) {
|
||||
checkUpdate();
|
||||
}
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
// 检测版本更新
|
||||
async checkUpdates() {
|
||||
// #ifdef APP-PLUS
|
||||
//调用接口获取后台版本信息,检查是否需要更新
|
||||
let versionInfo = await this.$api.login.getAppInfo();
|
||||
console.log('获取后台版本信息', versionInfo);
|
||||
// 待更新版本
|
||||
const currentVersion = versionInfo.versionName;
|
||||
console.log('后台需要更新版本', currentVersion);
|
||||
// 更新地址
|
||||
let androidUrl = versionInfo.url;
|
||||
// 是否强制更新 isMust 0.否 1.强制更新
|
||||
let showCancel = versionInfo.isMust ? true : false;
|
||||
// 比较版本是否不同 当前版本:plus.runtime.version
|
||||
const localVersion = plus.runtime.version.split('.');
|
||||
let current = currentVersion.split('.');
|
||||
// 默认是同一个版本,不需要更新
|
||||
let flag = false;
|
||||
current.forEach((item, i) => {
|
||||
if (item !== localVersion[i]) {
|
||||
// 检测到版本不同,需要更新
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (flag) {
|
||||
uni.showModal({
|
||||
// 更新提醒
|
||||
title: '发现新版本,是否更新',
|
||||
content: '待更新版本号:' + currentVersion ,
|
||||
// showCancel: showCancel,
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.doUpData(androidUrl);
|
||||
this.showdownLine = true;
|
||||
// plus.runtime.openURL(androidUrl)
|
||||
} else if (res.cancel) {
|
||||
// 不更新强制退出app
|
||||
if (showCancel) {
|
||||
console.log('不更新强制退出app');
|
||||
plus.runtime.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$myToast('无更新', 'none');
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
doUpData(Url) {
|
||||
uni.showLoading({
|
||||
title: '更新中……'
|
||||
});
|
||||
const downloadTask = uni.downloadFile({
|
||||
//执行下载
|
||||
url: Url, //下载地址
|
||||
timeout: 1000 * 30, //30秒超时时间
|
||||
success: downloadResult => {
|
||||
//下载成功
|
||||
console.log(downloadResult);
|
||||
this.showdownLine = false;
|
||||
uni.hideLoading();
|
||||
if (downloadResult.statusCode == 200) {
|
||||
plus.runtime.install(
|
||||
//安装软件
|
||||
downloadResult.tempFilePath,
|
||||
{
|
||||
force: true
|
||||
},
|
||||
function(res) {
|
||||
plus.runtime.restart();
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
this.showdownLine = false;
|
||||
this.$u.toast(err.errMsg);
|
||||
console.log(err);
|
||||
},
|
||||
complete: com => {
|
||||
console.log(com);
|
||||
}
|
||||
});
|
||||
|
||||
// 下载进度
|
||||
downloadTask.onProgressUpdate(res => {
|
||||
// this.$u.toast(res.progress)
|
||||
this.downloadNum = res.progress;
|
||||
// console.log('下载进度' + res.progress);
|
||||
// console.log('已经下载的数据长度' + res.totalBytesWritten);
|
||||
// console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
|
||||
|
||||
// 满足测试条件,取消下载任务。
|
||||
// if (res.progress > 50) {
|
||||
// downloadTask.abort();
|
||||
// }
|
||||
});
|
||||
},
|
||||
test() {
|
||||
let LODOP = getCLodop();
|
||||
// 更换为打印服务器ip 不需要加前缀
|
||||
|
||||
Reference in New Issue
Block a user