修改摄像头添加签收单、签收单查询
This commit is contained in:
parent
1930ff8966
commit
511658655f
34
api/iot/device.js
Normal file
34
api/iot/device.js
Normal file
@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备
|
||||
export function getDeviceList(query) {
|
||||
return request({
|
||||
url: "/system/deviceApp/getDeviceList",
|
||||
method: "get",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户手持设备
|
||||
export function getPdaDeviceList() {
|
||||
return request({
|
||||
url: "/system/deviceApp/getPdaDeviceListByUserId",
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevicePageList(query) {
|
||||
return request({
|
||||
url: "/system/deviceApp/list",
|
||||
method: "get",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceStorageCount(query) {
|
||||
return request({
|
||||
url: "/system/deviceApp/getDeviceStorageCount",
|
||||
method: "get",
|
||||
params: query
|
||||
})
|
||||
}
|
45
api/iot/deviceBill.js
Normal file
45
api/iot/deviceBill.js
Normal file
@ -0,0 +1,45 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询入库单据列表
|
||||
export function getDeviceBillBriefList(query) {
|
||||
return request({
|
||||
url: "/system/deviceBillBriefApp/list",
|
||||
method: "get",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询入库单据
|
||||
export function getDeviceBillInfo(id) {
|
||||
return request({
|
||||
url: "/system/deviceBillBriefApp/getInfo/"+id,
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function addDeviceBill(data) {
|
||||
return request({
|
||||
url: '/system/deviceBillBriefApp/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function updateDeviceBill(data) {
|
||||
return request({
|
||||
url: '/system/deviceBillBriefApp/edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteDeviceBill(id) {
|
||||
return request({
|
||||
url: '/system/deviceBillBriefApp/'+id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
17
api/iot/deviceStorageUser.js
Normal file
17
api/iot/deviceStorageUser.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询仓库
|
||||
export function getDeviceStorageUserByUserId(id) {
|
||||
return request({
|
||||
url: "/system/deviceStorageUserApp/getDeviceStorageUserByUserId/"+id,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getDeviceStorageUserListByUserId() {
|
||||
return request({
|
||||
url: "/system/deviceStorageUserApp/getDeviceStorageUserListByUserId",
|
||||
method: "get",
|
||||
})
|
||||
}
|
@ -283,6 +283,13 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/retrace/selectDeviceBill",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签收单据选择",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
/******************************* 运维 ******************************/
|
||||
{
|
||||
"path": "pages/dev-ops/index",
|
||||
|
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<custom-nav-bar :left="true" title="气象站"></custom-nav-bar>
|
||||
<custom-nav-bar :left="true" title="摄像头"></custom-nav-bar>
|
||||
<view class="content">
|
||||
<view class="preview" id="video-container"></view>
|
||||
<view :item="item" :change:item="ezuikit.loadItem"></view>
|
||||
<view class="preview" id="video-container" ></view>
|
||||
<view>
|
||||
<button @click="handlePlay">播放</button>
|
||||
<button @click="LookBack">回看</button>
|
||||
<button @click="ezuikit.handlePlay">播放</button>
|
||||
<button @click="ezuikit.LookBack">回看</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script module="ezuikit" lang="renderjs">
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
item:{},
|
||||
player:null
|
||||
item: {}
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
@ -22,6 +22,18 @@
|
||||
this.item = JSON.parse(decodeURIComponent(option.item));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script module="ezuikit" lang="renderjs">
|
||||
var accessToken=null;
|
||||
var ezopenUrl1=null;
|
||||
var ezopenUrl2=null;
|
||||
var outDeviceCode=null;
|
||||
var player = null;
|
||||
export default {
|
||||
onUnload(){
|
||||
try{
|
||||
this.stop();
|
||||
@ -38,27 +50,29 @@
|
||||
// 动态引入较大类库避免影响页面展示
|
||||
const script = document.createElement('script')
|
||||
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
||||
script.src = 'utils/ezuikit.js'
|
||||
script.src = 'static/ezuikit.js'
|
||||
script.onload = this.initPlayer.bind(this)
|
||||
document.head.appendChild(script)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadItem(oldValve,newValve,ownerInstance,insance){
|
||||
this.accessToken = newValve.accessToken;
|
||||
this.ezopenUrl1 = newValve.ezopenUrl1;
|
||||
this.ezopenUrl2 = newValve.ezopenUrl2;
|
||||
this.outDeviceCode = newValve.outDeviceCode;
|
||||
},
|
||||
initPlayer() {
|
||||
const {
|
||||
windowWidth,
|
||||
windowHeight
|
||||
} = uni.getSystemInfoSync();
|
||||
this.player = new EZUIKit.EZUIKitPlayer({
|
||||
id: 'video-container', // 视频容器ID
|
||||
accessToken: this.item.accessToken,
|
||||
url: this.item.ezopenUrl1,
|
||||
accessToken: this.accessToken,
|
||||
url: this.ezopenUrl1,
|
||||
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
||||
//template: "pcRec",
|
||||
//template: "mobileRe",
|
||||
//plugin: ['talk'], // 加载插件,talk-对讲
|
||||
width: windowWidth,
|
||||
height: windowWidth * 2 / 3,
|
||||
width: 500,
|
||||
height: 500 * 2 / 3,
|
||||
});
|
||||
window.player = this.player;
|
||||
},
|
||||
@ -69,10 +83,10 @@
|
||||
})
|
||||
},
|
||||
handlePlay(){
|
||||
this.changePlayUrl(this.item.ezopenUrl1,this.item.accessToken,this.item.outDeviceCode);
|
||||
this.changePlayUrl(this.ezopenUrl1,this.accessToken,this.outDeviceCode);
|
||||
},
|
||||
LookBack(){
|
||||
this.changePlayUrl(this.item.ezopenUrl2,this.item.accessToken,this.item.outDeviceCode);
|
||||
this.changePlayUrl(this.ezopenUrl2,this.accessToken,this.outDeviceCode);
|
||||
},
|
||||
changePlayUrl(url, accessToken, deviceSerial) {
|
||||
this.player.changePlayUrl({ url: url, accessToken: accessToken, deviceSerial: deviceSerial });
|
||||
|
@ -5,29 +5,29 @@
|
||||
<uni-grid :column="3" :showBorder="false">
|
||||
<uni-grid-item @click="toPage('report')">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-lvli" style="color: #34c3d4;"></uni-icons>
|
||||
<uni-icons custom-prefix="iconfont" type="icon-hz" style="color: #34c3d4;"></uni-icons>
|
||||
<text class="text">生产日报</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="toPage('sign')">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-a-bianji5" style="color: #fca61d;"></uni-icons>
|
||||
<uni-icons custom-prefix="iconfont" type="icon-ck" style="color: #fca61d;"></uni-icons>
|
||||
<text class="text">签收单</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<!-- <uni-grid-item @click="toPage('signquery')">
|
||||
<uni-grid-item @click="toPage('signquery')">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-dayin" style="color: #39ac4f;"></uni-icons>
|
||||
<text class="text">签收查询</text>
|
||||
</view>
|
||||
</uni-grid-item> -->
|
||||
<!-- <uni-grid-item @click="toPage('stock')">
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="toPage('backStock')">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-kccx" style="color: #08c4b4;"></uni-icons>
|
||||
<text class="text">库存查询</text>
|
||||
<text class="text">退库</text>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item @click="toPage('seq')">
|
||||
<!-- <uni-grid-item @click="toPage('seq')">
|
||||
<view class="grid-item-box">
|
||||
<uni-icons custom-prefix="iconfont" type="icon-zs1" style="color: #fca61d;"></uni-icons>
|
||||
<text class="text">出入库查询</text>
|
||||
@ -66,6 +66,11 @@
|
||||
url: '/pages/retrace/signBill'
|
||||
});
|
||||
break;
|
||||
case "signQuery":
|
||||
uni.navigateTo({
|
||||
url: '/pages/retrace/signQuery'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
158
pages/retrace/selectDeviceBill.vue
Normal file
158
pages/retrace/selectDeviceBill.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<view class="index-container">
|
||||
<z-paging ref="paging" @query="queryList" v-model="dataList" :default-page-size="queryParams.pageSize"
|
||||
:auto-show-system-loading="true" empty-view-text="抱歉,暂时还没有相关数据!">
|
||||
<template #top>
|
||||
<custom-nav-bar :left="true" leftText="" @leftClick="" title="签收单据选择">
|
||||
</custom-nav-bar>
|
||||
<view class="search">
|
||||
<u-search placeholder="请输入单据编号或操作人" @search="onSearchValue" @custom='onSearchValue'
|
||||
@clear="onSearchClear" shape="square"></u-search>
|
||||
</view>
|
||||
</template>
|
||||
<!--单据列表-->
|
||||
<u-radio-group >
|
||||
<template v-for="item in dataList">
|
||||
<view class="item-container">
|
||||
<view >
|
||||
<u-radio activeColor="#35842E" :name="item.billId" @change="onSelect($event,item)" ></u-radio>
|
||||
</view>
|
||||
<view>
|
||||
<view class="text">单据编号:{{item.billCode}}</view>
|
||||
<view class="text">单据类型:{{item.billTypeName}}</view>
|
||||
<view class="text">操作人:{{item.operUser}}</view>
|
||||
<view class="text">操作时间:{{item.billTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-radio-group>
|
||||
<template #bottom>
|
||||
<!--按钮-->
|
||||
<view class="buttons">
|
||||
<u-button type="success" text="确认" @click="submit"></u-button>
|
||||
<u-button text="取消" @click="cancel"></u-button>
|
||||
</view>
|
||||
</template>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDeviceBillBriefList
|
||||
} from "@/api/system/deviceBill"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
queryParams: {
|
||||
billTypeId: 2002,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
searchValue: ""
|
||||
},
|
||||
selectItem:{},
|
||||
selectList: []
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.queryParams.billtypeId = options.billtypeId
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
this.queryParams.pageNum = pageNo;
|
||||
getDeviceBillBriefList(this.queryParams).then(res => {
|
||||
this.$refs.paging.completeByTotal(res.rows, res.total);
|
||||
});
|
||||
},
|
||||
onSearchValue(e) {
|
||||
this.queryParams.deviceCode = e;
|
||||
this.queryList(1,20);
|
||||
},
|
||||
onSearchClear() {
|
||||
this.queryParams.deviceCode = null;
|
||||
this.queryList(1,20);
|
||||
},
|
||||
onSelect(e, item) {
|
||||
this.selectItem = item;
|
||||
},
|
||||
submit() {
|
||||
uni.$emit("selectBill",this.selectItem);
|
||||
this.cancel();
|
||||
},
|
||||
cancel() {
|
||||
uni.navigateBack({delta: 1})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index-container {
|
||||
background-color: #F6F3F3;
|
||||
height: 100%;
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
|
||||
.icon {
|
||||
margin: 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 10px 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: white;
|
||||
|
||||
button {
|
||||
margin: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-container {
|
||||
background: white;
|
||||
width: 100%;
|
||||
//height: 100%;
|
||||
border-radius: 1px;
|
||||
box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
margin-top: 1px;
|
||||
|
||||
.check-item {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
}
|
||||
.u-radio-group .row{
|
||||
display: flex;
|
||||
flex-flow:row
|
||||
}
|
||||
}
|
||||
</style>
|
@ -5,7 +5,7 @@
|
||||
<custom-nav-bar :left="true" title="签收单">
|
||||
<template v-slot:right>
|
||||
<view class="fixed">
|
||||
<view align="right" class="iconfont icon-jia icon" v-hasPermi="['system:deviceBillBrief:add']"
|
||||
<view align="right" class="iconfont icon-jia icon"
|
||||
@click="onAdd">
|
||||
</view>
|
||||
</view>
|
||||
@ -105,19 +105,19 @@
|
||||
},
|
||||
onEdit(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/stock/signBillAdd?type=edit&id=' + item.billId
|
||||
url: '/pages/retrace/signBillAdd?type=edit&id=' + item.billId
|
||||
});
|
||||
},
|
||||
//新增
|
||||
onAdd() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/stock/signBillAdd'
|
||||
url: '/pages/retrace/signBillAdd'
|
||||
});
|
||||
},
|
||||
deleteBill(row) {
|
||||
plugin.modal.confirm("确定删除吗?").then(res => {
|
||||
deleteDeviceBill(row.billId).then(res => {
|
||||
plugin.modal.msgSuccess("删除成功")
|
||||
uni.$u.toast("删除成功");
|
||||
//重新刷新列表
|
||||
this.queryList(1, 20);
|
||||
})
|
||||
|
@ -1,29 +1,35 @@
|
||||
<template></template>
|
||||
<!-- <template>
|
||||
<template>
|
||||
<view class="create-container">
|
||||
<custom-nav-bar :left="true" title="签收单新增">
|
||||
<template v-slot:right>
|
||||
<view class="fixed">
|
||||
<view align="right" class="icon iconfont icon-scan" @click="toQRCode"></view>
|
||||
<view align="right" class="icon iconfont icon-NFC1" @click="nfc"></view>
|
||||
<view align="right" class="iconfont icon-jia icon" @click="add"></view>
|
||||
</view>
|
||||
</template>
|
||||
</custom-nav-bar>
|
||||
<uni-section title="基础信息" type="line">
|
||||
<u--form labelPosition="left" :model="briefForm" :rules="rules" ref="form">
|
||||
<u-line color="#D2D2D2"></u-line>
|
||||
<u-form-item class="form-item" label="仓库" prop="storageInName" labelWidth="100px" required>
|
||||
<u--input style="background: white" @click="showStorageIn=true" v-model="briefForm.storageInName"
|
||||
border="none" disabled placeholder="请选择仓库" suffixIcon="arrow-right"
|
||||
class="custom-input"></u--input>
|
||||
<u-form-item class="form-item" label="签收单号" prop="sourceBillCode" labelWidth="100px" required>
|
||||
<u--input style="background: white" v-model="briefForm.sourceBillCode" border="none" disabled
|
||||
placeholder="请选择签收单号" suffixIcon="arrow-right" class="custom-input"
|
||||
@click="onselectBillCode"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="签收类型" prop="storageOutType" required>
|
||||
<u-radio-group @change="onStorageOutType" v-model="briefForm.storageOutType">
|
||||
<u-radio activeColor="green" shape="square" label="仓库" :name="1" />
|
||||
<u-radio activeColor="green" shape="square" label="手持机" :name="2" />
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item label="签收仓库" prop="storageInName" required v-if="this.briefForm.storageOutType==1">
|
||||
<u--input @click="showStorageIn=true" v-model="briefForm.storageInName" border="none" disabled
|
||||
placeholder="请选择签收仓库" suffixIcon="arrow-right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手持机" prop="devicePdaCode" required v-if="this.briefForm.storageOutType==2">
|
||||
<u--input @click="showDevicePda= true;" v-model="briefForm.devicePdaCode" border="none" disabled
|
||||
placeholder="请选择签收手持机" suffixIcon="arrow-right"></u--input>
|
||||
</u-form-item>
|
||||
<u-line color="#D2D2D2"></u-line>
|
||||
<u-form-item class="form-item" label="单据日期" prop="billDate" labelWidth="100px" required>
|
||||
<uni-datetime-picker v-model="briefForm.billDate" type="date" class="custom-input" />
|
||||
</u-form-item>
|
||||
<u-line color="#D2D2D2"></u-line>
|
||||
<u-form-item class="form-item" label="操作人" prop="operUser" labelWidth="100px" required>
|
||||
<u-form-item class="form-item" label="签收人" prop="operUser" labelWidth="100px" required>
|
||||
<u--input v-model.trim="briefForm.operUser" border="none" placeholder="" disabled
|
||||
class="custom-input"></u--input>
|
||||
</u-form-item>
|
||||
@ -36,11 +42,12 @@
|
||||
<view style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<view class="flex-text" style="margin: 15px;">
|
||||
<view class="flex-text-one" style="color: black;">
|
||||
{{ item.deviceCode }}:{{ item.deviceTypeName }}</view>
|
||||
{{ item.deviceCode }}:{{ item.deviceTypeName }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-right: 5px;">
|
||||
<!-- <view style="margin-right: 5px;">
|
||||
<u-button type="success" text="删除" @click="deleteDetail(item)" />
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<u-gap height="1" bgColor="#D2D2D2"></u-gap>
|
||||
</view>
|
||||
@ -49,41 +56,27 @@
|
||||
<u-button type="success" @click="submit">确认</u-button>
|
||||
<u-button @click="cancel">取消</u-button>
|
||||
</view>
|
||||
<u-action-sheet :show="showStorageIn" :actions="deviceStorageInData" title="仓库" description=""
|
||||
<u-action-sheet :show="showStorageIn" :actions="storageInData" title="签收仓库" description=""
|
||||
@close="showStorageIn = false" @select="onStorageInSelect"></u-action-sheet>
|
||||
<u-modal title="手动输入" :show="showDeviceModal" showCancelButton buttonReverse height="300px"
|
||||
@confirm="confirmDevice" @cancel="cancelDeviceInfo">
|
||||
<view class="slot-content">
|
||||
<u--form labelPosition="left" :model="deviceInfoData" ref="formDevice">
|
||||
<u-form-item label="编号" prop="deviceCode" labelWidth="100px" required>
|
||||
<u--input v-model="deviceInfoData.deviceCode" placeholder="请输入编号"></u--input>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
</u-modal>
|
||||
<u-action-sheet :show="showDevicePda" :actions="devicePdaData" title="签收手持机" description=""
|
||||
@close="showDevicePda = false" @select="onDevicePdaSelect"></u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store"
|
||||
import plugin from "@/plugins"
|
||||
// import {
|
||||
// getDeviceList
|
||||
// } from "@/api/iot/device"
|
||||
// import {
|
||||
// getDeviceBillInfo,
|
||||
// addDeviceBill,
|
||||
// updateDeviceBill
|
||||
// } from "@/api/iot/deviceBill"
|
||||
// import {
|
||||
// deleteDeviceBillWms
|
||||
// } from "@/api/iot/deviceBillWms"
|
||||
import {
|
||||
initNFC,
|
||||
closeNFC,
|
||||
//类型
|
||||
setNfcType
|
||||
} from '@/utils/nfc.js';
|
||||
getDeviceList,
|
||||
getPdaDeviceList
|
||||
} from "@/api/iot/device"
|
||||
import {
|
||||
getDeviceBillInfo,
|
||||
addDeviceBill,
|
||||
updateDeviceBill
|
||||
} from "@/api/iot/deviceBill"
|
||||
import {
|
||||
getDeviceStorageUserListByUserId
|
||||
} from "@/api/iot/deviceStorageUser"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -96,9 +89,9 @@
|
||||
briefForm: {},
|
||||
addType: 1,
|
||||
showStorageIn: false,
|
||||
showDeviceModal: false,
|
||||
storageInData: store.state.user.userStorage,
|
||||
deviceStorageInData: [],
|
||||
showDevicePda: false,
|
||||
storageInData: [],
|
||||
devicePdaData: [],
|
||||
deviceInfoData: {
|
||||
deviceCode: null
|
||||
},
|
||||
@ -106,13 +99,13 @@
|
||||
storageInName: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "仓库不能为空",
|
||||
message: "签收仓库不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
},
|
||||
operUser: [{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请填写操作人",
|
||||
message: "签收人不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
}],
|
||||
billDate: [{
|
||||
@ -129,31 +122,6 @@
|
||||
this.reset();
|
||||
},
|
||||
onLoad(options) {
|
||||
initNFC(({
|
||||
code,
|
||||
data,
|
||||
message
|
||||
}) => {
|
||||
if (code !== 200) {
|
||||
uni.$u.toast(message);
|
||||
return;
|
||||
}
|
||||
switch (data.type) {
|
||||
case 'cardNo':
|
||||
if (this.addType == 2) {
|
||||
this.getDeviceInfo(data.id);
|
||||
}
|
||||
break;
|
||||
case 'read':
|
||||
uni.$u.toast(data.text);
|
||||
break;
|
||||
case 'write':
|
||||
uni.$u.toast(message);
|
||||
break;
|
||||
default:
|
||||
uni.$u.toast("未知属性");
|
||||
}
|
||||
});
|
||||
if (options) {
|
||||
if (options.type) {
|
||||
this.type = options.type;
|
||||
@ -162,21 +130,53 @@
|
||||
this.billId = options.id;
|
||||
}
|
||||
}
|
||||
this.getDeviceStorageInData();
|
||||
this.getDeviceStorageUserList();
|
||||
this.getPdaDeviceData();
|
||||
if (this.type == "edit") {
|
||||
this.getDeviceBill();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
setNfcType("cardNo");
|
||||
uni.$off("selectBill");
|
||||
uni.$on("selectBill", e => {
|
||||
this.briefForm.sourceBillCode = e.billCode;
|
||||
this.briefForm.sourceBillId = e.billId;
|
||||
this.briefForm.sourceBillTypeId = e.billTypeId;
|
||||
getDeviceBillInfo(e.billId).then(res => {
|
||||
if (res && res.data) {
|
||||
let detailList=[];
|
||||
res.data.deviceBillWmsVos.map(item=>{
|
||||
let detailObj={};
|
||||
detailObj.sourceBillDetailId= item.billDetailId;
|
||||
detailObj.sourceBillTypeId = item.billTypeId;
|
||||
detailObj.sourceBillId=item.billId;
|
||||
detailObj.billTypeId=2003;
|
||||
detailObj.deviceId=item.deviceId;
|
||||
detailObj.deviceCode=item.deviceCode;
|
||||
detailObj.deviceTypeId=item.deviceTypeId;
|
||||
detailObj.operUserId=this.user.userId;
|
||||
detailObj.operUser=this.user.userName;
|
||||
detailObj.storageInStatus=1;
|
||||
detailList.push(detailObj);
|
||||
});
|
||||
this.dataList = detailList;
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.briefForm = {
|
||||
billId: null,
|
||||
billTypeId: 2001,
|
||||
storageInId: this.storageInData[0].id,
|
||||
storageInName: this.storageInData[0].storageName,
|
||||
billTypeId: 2003,
|
||||
storageInId: null,
|
||||
storageInName: null,
|
||||
devicePdaId: null,
|
||||
devicePdaCode: null,
|
||||
sourceBillTypeId: null,
|
||||
storageOutType: 2,
|
||||
sourceBillId: null,
|
||||
sourceBillCode: null,
|
||||
billDate: this.getNowFormatDate(),
|
||||
billTime: null,
|
||||
sourceBillId: null,
|
||||
@ -205,6 +205,10 @@
|
||||
this.briefForm.storageInId = e.id
|
||||
this.briefForm.storageInName = e.name
|
||||
},
|
||||
onDevicePdaSelect(e) {
|
||||
this.briefForm.devicePdaId = e.id
|
||||
this.briefForm.devicePdaCode = e.name
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
if (this.type == "edit") {
|
||||
@ -214,7 +218,7 @@
|
||||
//修改接口
|
||||
this.briefForm.deviceBillWmsVos = this.dataList;
|
||||
updateDeviceBill(this.briefForm).then(res => {
|
||||
plugin.modal.msgSuccess("修改成功")
|
||||
uni.$u.toast("修改成功")
|
||||
this.cancel();
|
||||
})
|
||||
})
|
||||
@ -229,7 +233,7 @@
|
||||
//新增接口
|
||||
this.briefForm.deviceBillWmsVos = this.dataList;
|
||||
addDeviceBill(this.briefForm).then(res => {
|
||||
plugin.modal.msgSuccess("新增成功"+res.msg)
|
||||
uni.$u.toast("新增成功" + res.msg);
|
||||
this.cancel();
|
||||
})
|
||||
})
|
||||
@ -240,7 +244,9 @@
|
||||
},
|
||||
//返回
|
||||
cancel() {
|
||||
plugin.tab.navigateBack();
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
uni.$emit("cancelpage", "close")
|
||||
},
|
||||
//扫码
|
||||
@ -264,21 +270,58 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
add: function() {
|
||||
this.showDeviceModal = true;
|
||||
this.addType = 1;
|
||||
//选择签收单
|
||||
onselectBillCode: function() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/retrace/selectDeviceBill?billTypeId=2002'
|
||||
});
|
||||
},
|
||||
//nfc
|
||||
nfc() {
|
||||
this.addType = 2;
|
||||
},
|
||||
confirmDevice() {
|
||||
this.addType = 1;
|
||||
this.showDeviceModal = false;
|
||||
this.getDeviceInfo(this.deviceInfoData.deviceCode);
|
||||
},
|
||||
cancelDeviceInfo() {
|
||||
this.showDeviceModal = false;
|
||||
onStorageOutType(e) {
|
||||
this.briefForm.storageOutType = e;
|
||||
if (e == 1) {
|
||||
this.rules = {
|
||||
storageInName: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "签收仓库不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
},
|
||||
operUser: [{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "签收人不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
}],
|
||||
billDate: [{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "单据日期不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
}]
|
||||
}
|
||||
|
||||
} else {
|
||||
this.rules = {
|
||||
devicePdaCode: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "签收手持机不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
},
|
||||
operUser: [{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "签收人不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
}],
|
||||
billDate: [{
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "单据日期不能为空",
|
||||
trigger: ["blur", "change"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取扫码或nfc查询设备
|
||||
getDeviceInfo(code) {
|
||||
@ -288,7 +331,6 @@
|
||||
} else {
|
||||
query.nfcCode = code;
|
||||
}
|
||||
|
||||
getDeviceList(query).then(res => {
|
||||
if (res && res.data && res.data.length) {
|
||||
let index = this.dataList.findIndex(x => x.deviceId == res.data[0].id);
|
||||
@ -305,6 +347,35 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getDeviceStorageUserList() {
|
||||
getDeviceStorageUserListByUserId().then(res => {
|
||||
if (res && res.data) {
|
||||
this.storageInData = res.data.map(
|
||||
item => {
|
||||
return {
|
||||
name: item.storageName,
|
||||
id: item.id,
|
||||
item: item
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取手持机
|
||||
getPdaDeviceData() {
|
||||
getPdaDeviceList().then(res => {
|
||||
if (res && res.data) {
|
||||
this.devicePdaData = res.data.map(
|
||||
item => {
|
||||
return {
|
||||
name: item.deviceCode,
|
||||
id: item.id,
|
||||
item: item
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
getDeviceBill() {
|
||||
getDeviceBillInfo(this.billId).then(res => {
|
||||
if (res && res.data) {
|
||||
@ -315,16 +386,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getDeviceStorageInData() {
|
||||
this.deviceStorageInData = this.storageInData.map(
|
||||
item => {
|
||||
return {
|
||||
name: item.storageName,
|
||||
id: item.id,
|
||||
item: item
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取当前日期
|
||||
getNowFormatDate() {
|
||||
let date = new Date();
|
||||
@ -346,16 +407,24 @@
|
||||
.create-container {
|
||||
background-color: #FFF;
|
||||
|
||||
.custom-input {
|
||||
width: 280px;
|
||||
}
|
||||
::v-deep .u-form {
|
||||
padding: 10px;
|
||||
|
||||
.u-form-item__body {
|
||||
margin-bottom: 10px;
|
||||
margin-left: 10px;
|
||||
padding: 0;
|
||||
|
||||
.u-form-item__body__left {
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
.u-input--square {
|
||||
height: 35px;
|
||||
padding: 0px 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.form-item {
|
||||
width: 100%;
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
@ -368,31 +437,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
.item-container {
|
||||
margin: 10px 10px;
|
||||
background-color: white;
|
||||
padding-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
// .item-container {
|
||||
// margin: 10px 10px;
|
||||
// background-color: white;
|
||||
// padding-bottom: 10px;
|
||||
// border-radius: 10px;
|
||||
// box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
|
||||
// }
|
||||
|
||||
.flex-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// .flex-text {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
|
||||
.flex-text-one {
|
||||
color: #939393;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
// .flex-text-one {
|
||||
// color: #939393;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
// }
|
||||
|
||||
.data {
|
||||
margin: 10px 20px !important;
|
||||
width: 100%;
|
||||
// .data {
|
||||
// margin: 10px 20px !important;
|
||||
// width: 100%;
|
||||
|
||||
.uni-col {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
// .uni-col {
|
||||
// margin-bottom: 5px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style> -->
|
||||
</style>
|
@ -2,10 +2,10 @@
|
||||
<z-paging ref="paging" @query="queryList" v-model="dataList" :default-page-size="queryParams.pageSize"
|
||||
:auto-show-system-loading="true" empty-view-text="抱歉,暂时还没有相关数据!">
|
||||
<template #top>
|
||||
<custom-nav-bar :left="true" title="签收单查询">
|
||||
<custom-nav-bar :left="true" title="签收查詢">
|
||||
<template v-slot:right>
|
||||
<view class="fixed">
|
||||
<view align="right" class="iconfont icon-jia icon" v-hasPermi="['system:deviceBillBrief:add']"
|
||||
<view align="right" class="iconfont icon-jia icon"
|
||||
@click="onAdd">
|
||||
</view>
|
||||
</view>
|
||||
@ -22,12 +22,9 @@
|
||||
<view>
|
||||
<view class="text">仓库:{{ item.storageInName}}</view>
|
||||
</view>
|
||||
<view class="title-r" v-hasPermi="['system:deviceBillBrief:remove']">
|
||||
<u-button class="bg-red" type="success" size="mini" text="删除" @click="deleteBill(item)" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cards-content">
|
||||
<view class="txt-list" @click="onEdit(item)">
|
||||
<view class="txt-list">
|
||||
<view class="left">
|
||||
<view><text>日期:</text>{{ item.billDate}}</view>
|
||||
<view><text>操作员:</text>{{ item.operUser}}</view>
|
||||
@ -103,26 +100,6 @@
|
||||
this.$refs.paging.completeByTotal(res.rows, res.total);
|
||||
});
|
||||
},
|
||||
onEdit(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/stock/signBillAdd?type=edit&id=' + item.billId
|
||||
});
|
||||
},
|
||||
//新增
|
||||
onAdd() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/stock/signBillAdd'
|
||||
});
|
||||
},
|
||||
deleteBill(row) {
|
||||
plugin.modal.confirm("确定删除吗?").then(res => {
|
||||
deleteDeviceBill(row.billId).then(res => {
|
||||
plugin.modal.msgSuccess("删除成功")
|
||||
//重新刷新列表
|
||||
this.queryList(1, 20);
|
||||
})
|
||||
})
|
||||
},
|
||||
maskClick(e) {
|
||||
this.queryList(1, 20);
|
||||
},
|
||||
|
@ -194,7 +194,7 @@
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
plugin.modal.msgError("获取准备修改的用户的信息失败," + error)
|
||||
uni.$u.toast("获取准备修改的用户的信息失败,"+ error)
|
||||
})
|
||||
.finally(() => {
|
||||
plugin.modal.closeLoading()
|
||||
@ -220,7 +220,7 @@
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
plugin.modal.msgError("获取角色数据失败," + error)
|
||||
uni.$u.toast("获取角色数据失败,"+ error)
|
||||
})
|
||||
.finally(() => {
|
||||
plugin.modal.closeLoading()
|
||||
@ -307,11 +307,11 @@
|
||||
store
|
||||
.dispatch("updateUser", this.userForm)
|
||||
.then(res => {
|
||||
plugin.modal.showToast("用户信息修改成功")
|
||||
uni.$u.toast("用户信息修改成功")
|
||||
plugin.tab.navigateBack()
|
||||
})
|
||||
.catch(error => {
|
||||
plugin.modal.msgError("用户修改信息失败," + error)
|
||||
uni.$u.toast("用户修改信息失败,"+ error)
|
||||
})
|
||||
.finally(() => {
|
||||
plugin.modal.closeLoading()
|
||||
|
@ -84,7 +84,6 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = JSON.parse(decodeURIComponent(options.userInfo));
|
||||
console.log(this.userInfo)
|
||||
this.queryList();
|
||||
},
|
||||
onShow() {
|
||||
|
@ -143,7 +143,7 @@
|
||||
created() {
|
||||
this.windowHeight = uni.getSystemInfoSync().windowHeight;
|
||||
},
|
||||
onLoad()
|
||||
onLoad() {
|
||||
if (getApp().ijs.land) {
|
||||
this.companyGroupId = getApp().ijs.land.companyGroupId
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
<!-- 顶部导航栏 -->
|
||||
<custom-nav-bar :left="true" leftText="" @leftClick="" title="其它设备选择">
|
||||
</custom-nav-bar>
|
||||
|
||||
|
||||
<view class="index-container">
|
||||
<z-paging ref="paging" use-virtual-list @query="queryList" bg-color="#F6F3F3" :loading-more-enabled="false">
|
||||
<template #top>
|
||||
|
Loading…
Reference in New Issue
Block a user