Commit 1dd19fc2 by LJM

js

parent 0983f604
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
text { text {
font-size: 26rpx; font-size: 26rpx;
color: #197adb; color: #197adb;
margin-right: 10rpx; margin-right: 60rpx;
font-weight: bold;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
} }
} }
.uni-table-box { .uni-table-box {
padding-top: 24rpx;
padding-bottom: 24rpx; padding-bottom: 24rpx;
background-color: #ffffff; background-color: #ffffff;
::v-deep .uni-table-scroll { ::v-deep .uni-table-scroll {
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
height: 98rpx; height: 98rpx;
background: #ffffff; background: #ffffff;
padding: 0 24rpx; padding: 0 24rpx;
z-index: 999; z-index: 98;
.t1 { .t1 {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
...@@ -116,6 +118,7 @@ ...@@ -116,6 +118,7 @@
border-radius: 4rpx; border-radius: 4rpx;
font-size: 28rpx; font-size: 28rpx;
color: #ffffff; color: #ffffff;
margin-bottom: 100rpx;
} }
} }
...@@ -160,4 +163,10 @@ ...@@ -160,4 +163,10 @@
.uni-table-td { .uni-table-td {
border-right: 1px #ebeef5 solid; border-right: 1px #ebeef5 solid;
} }
.pop-list .uni-table-th {
width: 33.3% !important;
}
.pop-list .uni-table-td {
width: 33.3% !important;
}
} }
<template> <template>
<view class="scanInventory"> <view class="scanInventory">
<view class="scanInven-form-item"> <view class="scanInven-form-item">
<view class="box row verCenter operate"><text>箱列表</text></view> <view class="box row verCenter operate">
<text @click="exportChange()">导出</text>
<text @click="getBoxSnAndNumAll()">箱列表</text>
</view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">箱号</view> <view class="label">箱号</view>
<input v-model="box_sn" @input="inputChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="请输入箱号" /> <input v-model="box_sn" @input="inputChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="请输入箱号" />
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="addRow row rowCenter verCenter">新增行</view> <view class="addRow row rowCenter verCenter" @click="addRowChange()">新增行</view>
<view class="uni-table-box"> <view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> <uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr> <uni-tr>
...@@ -28,8 +31,8 @@ ...@@ -28,8 +31,8 @@
</uni-tr> </uni-tr>
<uni-tr v-for="(item, index) in list" :key="index"> <uni-tr v-for="(item, index) in list" :key="index">
<uni-td align="center">{{ index + 1 }}</uni-td> <uni-td align="center">{{ index + 1 }}</uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_sn" /></uni-td> <uni-td align="center"><input class="uni-input" v-model="list[index].goods_sn" /></uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_num" /></uni-td> <uni-td align="center"><input class="uni-input" v-model="list[index].goods_num" /></uni-td>
<uni-td align="center">{{ item.scan_time_cn }}</uni-td> <uni-td align="center">{{ item.scan_time_cn }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
...@@ -42,6 +45,22 @@ ...@@ -42,6 +45,22 @@
</view> </view>
<view class="btn row rowCenter verCenter" @click="deleteChange">删除</view> <view class="btn row rowCenter verCenter" @click="deleteChange">删除</view>
</view> </view>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="uni-table-box pop-list" style="width: 550rpx;">
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">箱号</uni-th>
<uni-th align="center">货品数</uni-th>
<uni-th align="center">保存时间</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in listPop" :key="index">
<uni-td align="center">{{ item.box_sn }}</uni-td>
<uni-td align="center">{{ item.box_sn_goods_num }}</uni-td>
<uni-td align="center">{{ item.scan_time_cn }}</uni-td>
</uni-tr>
</uni-table>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -55,14 +74,28 @@ export default { ...@@ -55,14 +74,28 @@ export default {
code_str: 'QTY:500 PN:PR03-1R CPN:PR03000201008JAC00 PO:18365781/11 CPO:B131190+A64120 MFR:VISHAY MPN:PR03000201008JAC00 RoHS', code_str: 'QTY:500 PN:PR03-1R CPN:PR03000201008JAC00 PO:18365781/11 CPO:B131190+A64120 MFR:VISHAY MPN:PR03000201008JAC00 RoHS',
code_type: '', code_type: '',
list: [], list: [],
listPop: [],
selectedIndexs: [], selectedIndexs: [],
index: -1, index: -1,
array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop'], array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop'],
arrar_val: ['digikey', 'Mouser', 'Arrow', 'Rochester', 'TME', 'Chip1stop'] arrar_val: ['digikey', 'Mouser', 'Arrow', 'Rochester', 'TME', 'Chip1stop']
}; };
}, },
created() {},
methods: { methods: {
getBoxSnAndNumAll() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: '' }, true).then(res => {
if (res.err_code === 0) {
this.listPop = res.data;
this.$refs.popup.open('center');
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
getBoxSnAndNum() { getBoxSnAndNum() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn }, false).then(res => { this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn }, false).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
...@@ -82,7 +115,7 @@ export default { ...@@ -82,7 +115,7 @@ export default {
this.list.unshift({ this.list.unshift({
goods_num: res.data.num || '', goods_num: res.data.num || '',
goods_sn: res.data.sn || '', goods_sn: res.data.sn || '',
scan_time: '', scan_time_cn: '',
wsbxnmsn_id: '' wsbxnmsn_id: ''
}); });
} else { } else {
...@@ -128,6 +161,47 @@ export default { ...@@ -128,6 +161,47 @@ export default {
this.list.splice(this.selectedIndexs[i], 1); this.list.splice(this.selectedIndexs[i], 1);
} }
}, },
exportChange() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn, export: 1 }, true).then(res => {
if (res.err_code === 0) {
uni.downloadFile({
url: res.data,
success: function(res) {
const filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
},
fail: function() {
uni.showModal({
title: '提示',
content: '暂不支持该文件类型预览',
showCancel: false
});
console.log('打开文档失败');
}
});
}
});
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
addRowChange() {
this.list.unshift({
goods_num: '',
goods_sn: '',
scan_time_cn: '',
wsbxnmsn_id: ''
});
},
submit() { submit() {
let params = {}; let params = {};
let arr = []; let arr = [];
...@@ -140,7 +214,7 @@ export default { ...@@ -140,7 +214,7 @@ export default {
} }
params.list = JSON.stringify(arr); params.list = JSON.stringify(arr);
params.box_sn = this.box_sn; params.box_sn = this.box_sn;
this.request(API.submitBoxSnAndNum, 'POST', params, false).then(res => { this.request(API.submitBoxSnAndNum, 'POST', params, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
......
## 1.8.2(2023-02-02)
- uni-popup-dialog 组件新增 inputType 属性
## 1.8.1(2022-12-01)
- 修复 nvue 下 v-show 报错
## 1.8.0(2022-11-29)
- 优化 主题样式
## 1.7.9(2022-04-02)
- 修复 弹出层内部无法滚动的bug
## 1.7.8(2022-03-28)
- 修复 小程序中高度错误的bug
## 1.7.7(2022-03-17)
- 修复 快速调用open出现问题的Bug
## 1.7.6(2022-02-14)
- 修复 safeArea 属性不能设置为false的bug
## 1.7.5(2022-01-19)
- 修复 isMaskClick 失效的bug
## 1.7.4(2022-01-19)
- 新增 cancelText \ confirmText 属性 ,可自定义文本
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
## 1.7.3(2022-01-13)
- 修复 设置 safeArea 属性不生效的bug
## 1.7.2(2021-11-26)
- 优化 组件示例
## 1.7.1(2021-11-26)
- 修复 vuedoc 文字错误
## 1.7.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
## 1.6.2(2021-08-24) ## 1.6.2(2021-08-24)
- 新增 支持国际化 - 新增 支持国际化
## 1.6.1(2021-07-30) ## 1.6.1(2021-07-30)
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
</view> </view>
<view v-else class="uni-dialog-content"> <view v-else class="uni-dialog-content">
<slot> <slot>
<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" > <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
</slot> </slot>
</view> </view>
<view class="uni-dialog-button-group"> <view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="closeDialog"> <view class="uni-dialog-button" @click="closeDialog">
<text class="uni-dialog-button-text">{{cancelText}}</text> <text class="uni-dialog-button-text">{{closeText}}</text>
</view> </view>
<view class="uni-dialog-button uni-border-left" @click="onOk"> <view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text> <text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
initVueI18n initVueI18n
} from '@dcloudio/uni-i18n' } from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js' import messages from '../uni-popup/i18n/index.js'
const { t } = initVueI18n(messages) const { t } = initVueI18n(messages)
/** /**
* PopUp 弹出层-对话框样式 * PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式 * @description 弹出层-对话框样式
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
mixins: [popup], mixins: [popup],
emits:['confirm','close'], emits:['confirm','close'],
props: { props: {
inputType:{
type: String,
default: 'text'
},
value: { value: {
type: [String, Number], type: [String, Number],
default: '' default: ''
...@@ -84,6 +88,14 @@ ...@@ -84,6 +88,14 @@
beforeClose: { beforeClose: {
type: Boolean, type: Boolean,
default: false default: false
},
cancelText:{
type: String,
default: ''
},
confirmText:{
type: String,
default: ''
} }
}, },
data() { data() {
...@@ -95,10 +107,10 @@ ...@@ -95,10 +107,10 @@
}, },
computed: { computed: {
okText() { okText() {
return t("uni-popup.ok") return this.confirmText || t("uni-popup.ok")
}, },
cancelText() { closeText() {
return t("uni-popup.cancel") return this.cancelText || t("uni-popup.cancel")
}, },
placeholderText() { placeholderText() {
return this.placeholder || t("uni-popup.placeholder") return this.placeholder || t("uni-popup.placeholder")
...@@ -162,10 +174,10 @@ ...@@ -162,10 +174,10 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-dialog { .uni-popup-dialog {
width: 300px; width: 300px;
border-radius: 15px; border-radius: 11px;
background-color: #fff; background-color: #fff;
} }
...@@ -175,8 +187,7 @@ ...@@ -175,8 +187,7 @@
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
padding-top: 15px; padding-top: 25px;
padding-bottom: 5px;
} }
.uni-dialog-title-text { .uni-dialog-title-text {
...@@ -191,12 +202,12 @@ ...@@ -191,12 +202,12 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 5px 15px 15px 15px; padding: 20px;
} }
.uni-dialog-content-text { .uni-dialog-content-text {
font-size: 14px; font-size: 14px;
color: #6e6e6e; color: #6C6C6C;
} }
.uni-dialog-button-group { .uni-dialog-button-group {
...@@ -228,7 +239,8 @@ ...@@ -228,7 +239,8 @@
} }
.uni-dialog-button-text { .uni-dialog-button-text {
font-size: 14px; font-size: 16px;
color: #333;
} }
.uni-button-color { .uni-button-color {
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-message { .uni-popup-message {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
......
...@@ -59,16 +59,16 @@ ...@@ -59,16 +59,16 @@
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png', icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
name: 'sina' name: 'sina'
}, },
{ // {
text: '百度', // text: '百度',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png', // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
name: 'copy' // name: 'copy'
}, // },
{ // {
text: '其他', // text: '其他',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png', // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
name: 'more' // name: 'more'
} // }
] ]
} }
}, },
...@@ -103,9 +103,11 @@ ...@@ -103,9 +103,11 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-share { .uni-popup-share {
background-color: #fff; background-color: #fff;
border-top-left-radius: 11px;
border-top-right-radius: 11px;
} }
.uni-share-title { .uni-share-title {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
......
{ {
"id": "uni-popup", "id": "uni-popup",
"displayName": "uni-popup 弹出层", "displayName": "uni-popup 弹出层",
"version": "1.6.2", "version": "1.8.2",
"description": " Popup 组件,提供常用的弹层", "description": " Popup 组件,提供常用的弹层",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -17,12 +17,8 @@ ...@@ -17,12 +17,8 @@
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"category": [ "sale": {
"前端组件",
"通用组件"
],
"sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
}, },
...@@ -38,10 +34,12 @@ ...@@ -38,10 +34,12 @@
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": [ "dependencies": [
"uni-scss",
"uni-transition" "uni-transition"
], ],
"encrypt": [], "encrypt": [],
...@@ -81,7 +79,7 @@ ...@@ -81,7 +79,7 @@
}, },
"Vue": { "Vue": {
"vue2": "y", "vue2": "y",
"vue3": "u" "vue3": "y"
} }
} }
} }
......
## 1.3.1(2021-11-23)
- 修复 init 方法初始化问题
## 1.3.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
## 1.2.1(2021-09-27)
- 修复 init 方法不生效的 Bug
## 1.2.0(2021-07-30) ## 1.2.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) - 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.1(2021-05-12) ## 1.1.1(2021-05-12)
- 新增 示例地址 - 新增 示例地址
- 修复 示例项目缺少组件的Bug - 修复 示例项目缺少组件的 Bug
## 1.1.0(2021-04-22) ## 1.1.0(2021-04-22)
- 新增 通过方法自定义动画 - 新增 通过方法自定义动画
- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 - 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
...@@ -10,4 +17,4 @@ ...@@ -10,4 +17,4 @@
- 优化 支持单独的动画类型 - 优化 支持单独的动画类型
- 优化 文档示例 - 优化 文档示例
## 1.0.2(2021-02-05) ## 1.0.2(2021-02-05)
- 调整为uni_modules目录规范 - 调整为 uni_modules 目录规范
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
if (obj.duration) { if (obj.duration) {
this.durationTime = obj.duration this.durationTime = obj.duration
} }
this.animation = createAnimation(Object.assign(this.config, obj)) this.animation = createAnimation(Object.assign(this.config, obj),this)
}, },
/** /**
* 点击组件触发回调 * 点击组件触发回调
......
{ {
"id": "uni-transition", "id": "uni-transition",
"displayName": "uni-transition 过渡动画", "displayName": "uni-transition 过渡动画",
"version": "1.2.0", "version": "1.3.1",
"description": "元素的简单过渡动画", "description": "元素的简单过渡动画",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
}, },
"uni_modules": { "uni_modules": {
"dependencies": [], "dependencies": ["uni-scss"],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
...@@ -76,6 +76,10 @@ ...@@ -76,6 +76,10 @@
"快应用": { "快应用": {
"华为": "u", "华为": "u",
"联盟": "u" "联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment