zhang_li
6 months ago
811 changed files with 58887 additions and 113650 deletions
@ -1,4 +1,10 @@ |
|||||
|
#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api |
||||
|
#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api |
||||
|
|
||||
VITE_BASE_URL=http://localhost:12080/admin-api |
VITE_BASE_URL=http://localhost:12080/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
||||
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api |
# 是否是测试环境 |
||||
|
VITE_isDevelopment=true |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' |
@ -0,0 +1,11 @@ |
|||||
|
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"长春","value":1}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' |
@ -0,0 +1,11 @@ |
|||||
|
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"长春","value":1}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
@ -0,0 +1,11 @@ |
|||||
|
VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"长春","value":1}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' |
@ -0,0 +1,11 @@ |
|||||
|
VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' |
@ -0,0 +1,12 @@ |
|||||
|
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"成都","value":2}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' |
@ -0,0 +1,11 @@ |
|||||
|
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"成都","value":2}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' |
@ -1,4 +1,7 @@ |
|||||
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app |
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
||||
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111 |
|
||||
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn |
# 是否是测试环境 |
||||
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn |
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
||||
|
@ -1,2 +1,12 @@ |
|||||
VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25203/api/admin-api |
VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' |
||||
|
@ -1,157 +1,159 @@ |
|||||
<!-- 基于z-paging封装个性化分页组件演示,可减少大量重复代码 --> |
<!-- 基于z-paging封装个性化分页组件演示,可减少大量重复代码 --> |
||||
<template> |
<template> |
||||
<!-- 这边统一设置z-paging,在页面中使用时就不用重复写 --> |
<!-- 这边统一设置z-paging,在页面中使用时就不用重复写 --> |
||||
<!-- 如果要在这里设置极简写法,这里的ref不能设置为paging,设置为其他名即可,因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> |
<!-- 如果要在这里设置极简写法,这里的ref不能设置为paging,设置为其他名即可,因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> |
||||
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可,与minimalism-demo.vue中的一致,并且不用再从这个组件转发到页面,只要遵循上一行的规则即可 --> |
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可,与minimalism-demo.vue中的一致,并且不用再从这个组件转发到页面,只要遵循上一行的规则即可 --> |
||||
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" |
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :loading-more-loading-text="{ en: '英文的加载中', 'zh-cn': '中文的加载中', 'zh-hant-cn': '繁体的加载中' }"> |
||||
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" |
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为top固定在顶部 --> |
||||
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}"> |
<template #top> |
||||
|
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="top"了 --> |
||||
|
<slot name="top" /> |
||||
|
</template> |
||||
|
|
||||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为top固定在顶部 --> |
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为bottom固定在顶部 --> |
||||
<template #top> |
<!-- vue3中用v-slot:bottom --> |
||||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="top"了 --> |
<template #bottom> |
||||
<slot name="top" /> |
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="bottom"了 --> |
||||
</template> |
<slot name="bottom" /> |
||||
|
</template> |
||||
|
|
||||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为bottom固定在顶部 --> |
<template #empty v-if="$slots.empty"> |
||||
<!-- vue3中用v-slot:bottom --> |
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="empty"了 --> |
||||
<template #bottom> |
<slot name="empty" /> |
||||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="bottom"了 --> |
</template> |
||||
<slot name="bottom" /> |
|
||||
</template> |
|
||||
|
|
||||
<template #empty v-if="$slots.empty" > |
<!-- 这个是插入虚拟列表/内置列表的cell --> |
||||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="empty"了 --> |
<template #cell="{ item, index }"> |
||||
<slot name="empty" /> |
<slot name="cell" :item="item" :index="index" /> |
||||
</template> |
</template> |
||||
|
|
||||
<!-- 这个是插入虚拟列表/内置列表的cell --> |
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view,页面那边就不用再写下面两行了 --> |
||||
<template #cell="{item,index}"> |
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher",此时不用获取refresherStatus,会自动使用z-paging自带的下拉刷新view) --> |
||||
<slot name="cell" :item="item" :index="index"/> |
<template #refresher="{ refresherStatus }"> |
||||
</template> |
<!-- <custom-refresher :status="refresherStatus" /> --> |
||||
|
</template> |
||||
|
<!-- 自定义没有更多数据view --> |
||||
|
<template #loadingMoreNoMore> |
||||
|
<!-- <custom-nomore></custom-nomore> --> |
||||
|
<u-loadmore status="normore" /> |
||||
|
</template> |
||||
|
|
||||
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view,页面那边就不用再写下面两行了 --> |
<!-- 这里接收页面传进来的普通slot,如列表数据等 --> |
||||
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher",此时不用获取refresherStatus,会自动使用z-paging自带的下拉刷新view) --> |
<slot /> |
||||
<template #refresher="{refresherStatus}"> |
</z-paging> |
||||
<!-- <custom-refresher :status="refresherStatus" /> --> |
|
||||
</template> |
|
||||
<!-- 自定义没有更多数据view --> |
|
||||
<template #loadingMoreNoMore> |
|
||||
<!-- <custom-nomore></custom-nomore> --> |
|
||||
<uni-load-more status="normore" /> |
|
||||
</template> |
|
||||
|
|
||||
<!-- 这里接收页面传进来的普通slot,如列表数据等 --> |
|
||||
<slot /> |
|
||||
</z-paging> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
||||
name: "my-paging", |
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
||||
data() { |
|
||||
return { |
const props = defineProps({ |
||||
list: [] |
value: { |
||||
}; |
type: Array, |
||||
}, |
default() { |
||||
props: { |
return [] |
||||
//用于接收父组件v-model所绑定的list的值 |
} |
||||
value: { |
}, |
||||
type: Array, |
// 是否使用虚拟列表,默认为否 |
||||
default: function() { |
useVirtualList: { |
||||
return []; |
type: Boolean, |
||||
} |
default: false |
||||
}, |
}, |
||||
//是否使用虚拟列表,默认为否 |
// 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true |
||||
useVirtualList: { |
useInnerList: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: false |
default: false |
||||
}, |
}, |
||||
//是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true |
// 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 |
||||
useInnerList: { |
cellKeyName: { |
||||
type: Boolean, |
type: String, |
||||
default: false |
default: '' |
||||
}, |
}, |
||||
//内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 |
// innerList样式 |
||||
cellKeyName: { |
innerListStyle: { |
||||
type: String, |
type: Object, |
||||
default: '' |
default() { |
||||
}, |
return {} |
||||
//innerList样式 |
} |
||||
innerListStyle: { |
}, |
||||
type: Object, |
// 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各7页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 |
||||
default: function() { |
preloadPage: { |
||||
return {}; |
type: [Number, String], |
||||
} |
default: 12 |
||||
}, |
}, |
||||
//预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各7页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 |
// 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 |
||||
preloadPage: { |
cellHeightMode: { |
||||
type: [Number, String], |
type: String, |
||||
default: 12 |
default: 'fixed' |
||||
}, |
}, |
||||
//虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 |
// 虚拟列表scroll取样帧率,默认为60,过高可能出现卡顿等问题 |
||||
cellHeightMode: { |
virtualScrollFps: { |
||||
type: String, |
type: [Number, String], |
||||
default: 'fixed' |
default: 60 |
||||
}, |
} |
||||
//虚拟列表scroll取样帧率,默认为60,过高可能出现卡顿等问题 |
}) |
||||
virtualScrollFps: { |
const list = ref([]) |
||||
type: [Number, String], |
const paging = ref() |
||||
default: 60 |
// 监听页面v-mode传过来的值,同时传给z-paging |
||||
}, |
watch( |
||||
}, |
() => props.value, |
||||
watch: { |
(newVal) => { |
||||
//监听页面v-mode传过来的值,同时传给z-paging |
list.value = newVal |
||||
value(newVal) { |
} |
||||
this.list = newVal; |
) |
||||
}, |
// #ifdef VUE3 |
||||
// #ifdef VUE3 |
watch( |
||||
modelValue(newVal) { |
() => props.modelValue, |
||||
this.list = newVal; |
(newVal) => { |
||||
}, |
list.value = newVal |
||||
// #endif |
} |
||||
//监听z-paging给当前组件的值,同时传给页面 |
) |
||||
list(newVal) { |
// #endif |
||||
//通过emit input修改页面中v-model绑定的值 |
watch( |
||||
this.$emit('input', newVal); |
() => list.value, |
||||
// #ifdef VUE3 |
(newVal) => { |
||||
this.$emit('update:modelValue', newVal); |
// 通过emit input修改页面中v-model绑定的值 |
||||
// #endif |
emit('input', newVal) |
||||
} |
// #ifdef VUE3 |
||||
}, |
emit('update:modelValue', newVal) |
||||
methods: { |
// #endif |
||||
//监听z-paging的@query方法,通过emit传递给页面 |
} |
||||
queryList(pageNo, pageSize) { |
) |
||||
console.log("queryList",pageNo) |
|
||||
// this.$emit('query', pageNo, pageSize); |
// 监听z-paging的@query方法,通过emit传递给页面 |
||||
}, |
const queryList = (pageNo, pageSize) => { |
||||
//接收页面触发的reload方法,传给z-paging |
console.log('queryList', pageNo) |
||||
reload(data) { |
// this.$emit('query', pageNo, pageSize); |
||||
this.$refs.paging.reload(data); |
} |
||||
}, |
// 接收页面触发的reload方法,传给z-paging |
||||
//接收页面触发的complete方法,传给z-paging |
const reload = (data) => { |
||||
complete(data) { |
paging.value.reload(data) |
||||
this.$refs.paging.complete(data); |
} |
||||
}, |
// 接收页面触发的complete方法,传给z-paging |
||||
/* |
const complete = (data) => { |
||||
//如果是使用页面滚动,则需要添加以下三行,注意页面那边要引入mixins,与使用页面滚动示例写法相同。 |
paging.value.complete(data) |
||||
//接收页面触发的updatePageScrollTop方法,传给z-paging |
} |
||||
updatePageScrollTop(data){ |
/* |
||||
this.$refs.paging.updatePageScrollTop(data); |
//如果是使用页面滚动,则需要添加以下三行,注意页面那边要引入mixins,与使用页面滚动示例写法相同。 |
||||
}, |
//接收页面触发的updatePageScrollTop方法,传给z-paging |
||||
//接收页面触发的pageReachBottom方法,传给z-paging |
updatePageScrollTop(data){ |
||||
pageReachBottom(){ |
this.$refs.paging.updatePageScrollTop(data); |
||||
this.$refs.paging.pageReachBottom(); |
}, |
||||
}, |
//接收页面触发的pageReachBottom方法,传给z-paging |
||||
//接收页面触发的doChatRecordLoadMore方法,传给z-paging |
pageReachBottom(){ |
||||
doChatRecordLoadMore() { |
this.$refs.paging.pageReachBottom(); |
||||
this.$refs.paging.doChatRecordLoadMore(); |
}, |
||||
} |
//接收页面触发的doChatRecordLoadMore方法,传给z-paging |
||||
*/ |
doChatRecordLoadMore() { |
||||
} |
this.$refs.paging.doChatRecordLoadMore(); |
||||
} |
} |
||||
|
*/ |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['input', 'update:modelValue']) |
||||
|
defineExpose({ |
||||
|
reload, |
||||
|
complete |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
</style> |
|
||||
|
@ -1,82 +1,114 @@ |
|||||
{ |
{ |
||||
"name" : "富维汽车镜", |
"name": "富维汽车镜", |
||||
"appid" : "__UNI__DA78BC9", |
"appid": "__UNI__DA78BC9", |
||||
"description" : "", |
"description": "", |
||||
"versionName" : "1.0.0", |
"versionName": "1.0.0", |
||||
"versionCode" : "100", |
"versionCode": "100", |
||||
"transformPx" : false, |
"transformPx": false, |
||||
/* 5+App特有相关 */ |
/* 5+App特有相关 */ |
||||
"app-plus" : { |
"app-plus": { |
||||
"usingComponents" : true, |
"usingComponents": true, |
||||
"nvueStyleCompiler" : "uni-app", |
"nvueStyleCompiler": "uni-app", |
||||
"compilerVersion" : 3, |
"compilerVersion": 3, |
||||
"splashscreen" : { |
"splashscreen": { |
||||
"alwaysShowBeforeRender" : true, |
"alwaysShowBeforeRender": true, |
||||
"waiting" : true, |
"waiting": true, |
||||
"autoclose" : true, |
"autoclose": true, |
||||
"delay" : 0 |
"delay": 0 |
||||
}, |
}, |
||||
/* 模块配置 */ |
/* 模块配置 */ |
||||
"modules" : {}, |
"modules": {}, |
||||
/* 应用发布信息 */ |
/* 应用发布信息 */ |
||||
"distribute" : { |
"distribute": { |
||||
/* android打包配置 */ |
/* android打包配置 */ |
||||
"android" : { |
"android": { |
||||
"permissions" : [ |
"permissions": [ |
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
||||
"<uses-feature android:name=\"android.hardware.camera\"/>", |
"<uses-feature android:name=\"android.hardware.camera\"/>", |
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
||||
] |
] |
||||
}, |
}, |
||||
/* ios打包配置 */ |
/* ios打包配置 */ |
||||
"ios" : { |
"ios": { |
||||
"dSYMs" : false |
"dSYMs": false |
||||
}, |
}, |
||||
/* SDK配置 */ |
/* SDK配置 */ |
||||
"sdkConfigs" : { |
"sdkConfigs": { |
||||
"ad" : {} |
"ad": {} |
||||
} |
}, |
||||
} |
"nativePlugins": { |
||||
}, |
"TestModule": { |
||||
/* 快应用特有相关 */ |
"__plugin_info__": { |
||||
"quickapp" : {}, |
"name": "TestModule", |
||||
/* 小程序特有相关 */ |
"description": "打印", |
||||
"mp-weixin" : { |
"platforms": "Android", |
||||
"appid" : "wx6176535b0b0153f0", |
"url": "", |
||||
"setting" : { |
"android_package_name": "", |
||||
"urlCheck" : false |
"ios_bundle_id": "", |
||||
}, |
"isCloud": false, |
||||
"usingComponents" : true |
"bought": -1, |
||||
}, |
"pid": "", |
||||
"mp-alipay" : { |
"parameters": {} |
||||
"usingComponents" : true |
} |
||||
}, |
} |
||||
"mp-baidu" : { |
} |
||||
"usingComponents" : true |
}, |
||||
}, |
"nativePlugins": { |
||||
"mp-toutiao" : { |
"TestModule": { |
||||
"usingComponents" : true |
"__plugin_info__": { |
||||
}, |
"name": "TestModule", |
||||
"uniStatistics" : { |
"description": "打印", |
||||
"enable" : false |
"platforms": "Android", |
||||
}, |
"url": "", |
||||
"vueVersion" : "3", |
"android_package_name": "", |
||||
"h5" : { |
"ios_bundle_id": "", |
||||
"template" : "index.html", |
"isCloud": false, |
||||
"devServer" : { |
"bought": -1, |
||||
"port" : 9020 |
"pid": "", |
||||
} |
"parameters": {} |
||||
} |
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
/* 快应用特有相关 */ |
||||
|
"quickapp": {}, |
||||
|
/* 小程序特有相关 */ |
||||
|
"mp-weixin": { |
||||
|
"appid": "wx6176535b0b0153f0", |
||||
|
"setting": { |
||||
|
"urlCheck": false |
||||
|
}, |
||||
|
"usingComponents": true |
||||
|
}, |
||||
|
"mp-alipay": { |
||||
|
"usingComponents": true |
||||
|
}, |
||||
|
"mp-baidu": { |
||||
|
"usingComponents": true |
||||
|
}, |
||||
|
"mp-toutiao": { |
||||
|
"usingComponents": true |
||||
|
}, |
||||
|
"uniStatistics": { |
||||
|
"enable": false |
||||
|
}, |
||||
|
"vueVersion": "3", |
||||
|
"h5": { |
||||
|
"template": "index.html", |
||||
|
"devServer": { |
||||
|
"port": 9020 |
||||
|
} |
||||
|
} |
||||
} |
} |
@ -1,149 +1,95 @@ |
|||||
<template> |
<template> |
||||
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; "> |
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
||||
<view class="uni-flex uni-row space-between" style="align-items: center"> |
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx"> |
||||
<view> |
<view> |
||||
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> |
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> |
||||
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> |
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> |
||||
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> |
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> |
||||
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> |
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location> |
||||
</to-location> |
</view> |
||||
</view> |
<view class="uni-flex uni-row u-align-start"> |
||||
<view class="uni-flex uni-row center"> |
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
||||
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
|
||||
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> |
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> |
||||
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent" |
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> |
||||
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> |
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty> |
||||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)" |
|
||||
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack" |
|
||||
:isShowStatus='isShowStatus'> |
|
||||
</compare-qty> |
|
||||
|
|
||||
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()"> |
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()"> |
||||
<text style="font-size: 30rpx;color: #2979ff; width: 20px;" @click="copy">复制</text> |
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" /> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
</view> |
||||
</view> |
<!-- <u-line></u-line> --> |
||||
<!-- <u-line></u-line> --> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
import toLocation from '@/mycomponents/balance/toLocation.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import qty from '@/mycomponents/qty/qty.vue' |
import qty from '@/mycomponents/qty/qty.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import config from '@/static/config.js' |
||||
import config from '@/static/config.js' |
|
||||
|
|
||||
export default { |
|
||||
components: { |
|
||||
pack, |
|
||||
location, |
|
||||
toLocation, |
|
||||
batch, |
|
||||
qty, |
|
||||
recommendQty, |
|
||||
compareQty, |
|
||||
}, |
|
||||
|
|
||||
data() { |
const props = defineProps({ |
||||
return { |
dataContent: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
isShowPack: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowBatch: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowFromLocation: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowStdPack: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowStatus: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowToLocation: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
} |
||||
|
}) |
||||
|
const copy = () => { |
||||
|
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
|
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}` |
||||
|
|
||||
} |
uni.setClipboardData({ |
||||
}, |
data: content, |
||||
props: { |
success: () => { |
||||
dataContent: { |
uni.showToast({ |
||||
type: Object, |
title: '复制采购标签成功' |
||||
default: {} |
}) |
||||
}, |
} |
||||
isShowPack: { |
}) |
||||
type: Boolean, |
} |
||||
default: true |
const copyPro = () => { |
||||
}, |
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
isShowBatch: { |
const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}` |
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowFromLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowStdPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowStatus: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowToLocation: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
uni.setClipboardData({ |
||||
methods: { |
data: content, |
||||
copy() { |
success: () => { |
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
uni.showToast({ |
||||
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + |
title: '复制制品标签成功' |
||||
this.dataContent.batch + ";Q" + this.dataContent.qty |
}) |
||||
// #ifdef H5 |
} |
||||
this.$copyText(content).then( |
}) |
||||
res => { |
} |
||||
uni.showToast({ |
const isDevlement = () => { |
||||
title: '复制成功', |
return config.isDevelopment |
||||
icon: 'none' |
} |
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制采购标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
copyPro() { |
|
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|
||||
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + |
|
||||
this.dataContent.batch + ";Q" + this.dataContent.qty |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制制品标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
isDevlement() { |
|
||||
return config.isDevelopment; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,37 +1,26 @@ |
|||||
<template> |
<template> |
||||
<view class="business_view"> |
<view class="card_view"> |
||||
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text> |
<text class="card_business">{{ businessTypeDesc(bussinessType) }}</text> |
||||
<text class="card_business_content">{{number}}</text> |
<text class="card_business_content">{{ number }}</text> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { getBusinessTypeDesc } from '@/common/directory.js' |
||||
getBusinessTypeDesc |
|
||||
} from '@/common/directory.js'; |
|
||||
export default { |
|
||||
data() { |
|
||||
return {} |
|
||||
}, |
|
||||
props: { |
|
||||
bussinessType: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
number: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
} |
|
||||
}, |
|
||||
methods:{ |
|
||||
businessTypeDesc(type){ |
|
||||
return getBusinessTypeDesc(type) |
|
||||
} |
|
||||
|
|
||||
} |
const props = defineProps({ |
||||
|
bussinessType: { |
||||
} |
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
number: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
}) |
||||
|
const businessTypeDesc = (type) => { |
||||
|
return getBusinessTypeDesc(type) |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,83 +1,59 @@ |
|||||
<template> |
<template> |
||||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> |
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff"> |
||||
<view class="space_between center"> |
<view class="space_between center"> |
||||
<view style="word-break: break-all;width: 60%;"> |
<view style="word-break: break-all; width: 60%"> |
||||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
<pack title="外包装" v-if="detail.parentPackingNumber != undefined && detail.parentPackingNumber != ''" :packingCode="detail.parentPackingNumber"></pack> |
||||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
||||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
||||
</view> |
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
||||
<view style="word-break: break-all;"> |
</view> |
||||
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStatus='isShowStatus' |
<view style="word-break: break-all"> |
||||
:isShowStdPack="true"></recommend-qty> |
<recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty> |
||||
|
|
||||
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus='isShowStatus' |
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty> |
||||
:isShowStdPack="true"> |
</view> |
||||
</compare-qty> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
detail: { |
||||
pack, |
type: Object, |
||||
location, |
default: {} |
||||
batch, |
}, |
||||
recommendQty, |
isShowPack: { |
||||
compareQty |
type: Boolean, |
||||
}, |
default: true |
||||
|
}, |
||||
data() { |
isShowBatch: { |
||||
return { |
type: Boolean, |
||||
|
default: true |
||||
} |
}, |
||||
}, |
isShowLocation: { |
||||
props: { |
type: Boolean, |
||||
detail: { |
default: true |
||||
type: Object, |
}, |
||||
default: {} |
isShowStatus: { |
||||
}, |
type: Boolean, |
||||
isShowPack: { |
default: true |
||||
type: Boolean, |
} |
||||
default: true |
}) |
||||
}, |
|
||||
isShowBatch: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowStatus: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.recommend { |
.recommend { |
||||
position: absolute; |
position: absolute; |
||||
left: 25px; |
left: 25px; |
||||
top: 70px; |
top: 70px; |
||||
width: 10px; |
width: 10px; |
||||
height: 30px; |
height: 30px; |
||||
opacity: 1; |
opacity: 1; |
||||
|
} |
||||
} |
|
||||
</style> |
</style> |
@ -1,34 +1,21 @@ |
|||||
<template> |
<template> |
||||
<view class="card_view"> |
<view class="card_view"> |
||||
<text class="card_packing_code card_content ">包装</text> |
<text class="card_packing_code card_content">{{ title }}</text> |
||||
<text class="card_content ">{{packingCode}}</text> |
<text class="card_content">{{ packingCode }}</text> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
const props = defineProps({ |
||||
components: { |
packingCode: { |
||||
}, |
type: String, |
||||
|
default: '' |
||||
data() { |
}, |
||||
return { |
title: { |
||||
|
type: String, |
||||
} |
default: '包装' |
||||
}, |
} |
||||
props: { |
}) |
||||
packingCode: { |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,59 +1,40 @@ |
|||||
<template> |
<template> |
||||
<view :class="dataContent.scaned?'scan_view':''"> |
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
||||
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" |
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance> |
||||
:isShowFromLocation="isShowLocation"></balance> |
<production-info :dataContent="packageContent"></production-info> |
||||
<production-info :dataContent="packageContent"></production-info> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import balance from '@/mycomponents/balance/balance.vue' |
import balance from '@/mycomponents/balance/balance.vue' |
||||
import productionInfo from '@/mycomponents/production/productionInfo.vue' |
import productionInfo from '@/mycomponents/production/productionInfo.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
balance, |
type: Object, |
||||
productionInfo |
default: {} |
||||
}, |
}, |
||||
data() { |
packageContent: { |
||||
return { |
type: Object, |
||||
|
default: {} |
||||
} |
}, |
||||
}, |
isShowPack: { |
||||
props: { |
type: Boolean, |
||||
dataContent: { |
default: true |
||||
type: Object, |
}, |
||||
default: {} |
isShowBatch: { |
||||
}, |
type: Boolean, |
||||
packageContent: { |
default: true |
||||
type: Object, |
}, |
||||
default: {} |
isShowLocation: { |
||||
}, |
type: Boolean, |
||||
isShowPack: { |
default: true |
||||
type: Boolean, |
}, |
||||
default: true |
isShowStdPack: { |
||||
}, |
type: Boolean, |
||||
isShowBatch: { |
default: true |
||||
type: Boolean, |
} |
||||
default: true |
}) |
||||
}, |
|
||||
isShowLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowStdPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,84 +1,56 @@ |
|||||
<template> |
<template> |
||||
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;"> |
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #fff"> |
||||
<view class="uni-flex uni-row space-between center "> |
<view class="uni-flex uni-row space-between center"> |
||||
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" > |
<view class="uni-flex uni-row" style="width: 60%"> |
||||
<view style=" width: 25rpx;color: #32C1E8;"> |
<view style="width: 20rpx; color: #1677ff; margin-right: 20rpx; font-size: 24rpx"> 推荐 </view> |
||||
推荐 |
<view style="word-break: break-all"> |
||||
</view> |
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
||||
<view style="word-break: break-all"> |
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
||||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
||||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
</view> |
||||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
</view> |
||||
</view> |
<view style="word-break: break-all"> |
||||
</view> |
<recommend-qty v-if="detail.Records == null || detail.Records.length == 0" :dataContent="detail" :isShowStdPack="false" :isShowStatus="false"></recommend-qty> |
||||
<view style="word-break: break-all"> |
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> </compare-qty> |
||||
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail" |
</view> |
||||
:isShowStdPack="false" :isShowStatus="false"></recommend-qty> |
</view> |
||||
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)" |
</view> |
||||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> |
|
||||
</compare-qty> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
detail: { |
||||
pack, |
type: Object, |
||||
location, |
default: {} |
||||
batch, |
}, |
||||
recommendQty, |
isShowPack: { |
||||
compareQty |
type: Boolean, |
||||
}, |
default: true |
||||
|
}, |
||||
data() { |
isShowBatch: { |
||||
return { |
type: Boolean, |
||||
|
default: true |
||||
} |
}, |
||||
}, |
isShowLocation: { |
||||
props: { |
type: Boolean, |
||||
detail: { |
default: true |
||||
type: Object, |
} |
||||
default: {} |
}) |
||||
}, |
|
||||
isShowPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowBatch: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
|
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.recommend { |
.recommend { |
||||
position: absolute; |
position: absolute; |
||||
left: 25px; |
left: 25px; |
||||
top: 70px; |
top: 70px; |
||||
width: 10px; |
width: 10px; |
||||
height: 30px; |
height: 30px; |
||||
opacity: 1; |
opacity: 1; |
||||
|
} |
||||
} |
|
||||
</style> |
</style> |
||||
|
@ -1,31 +1,25 @@ |
|||||
<template> |
<template> |
||||
<view class="default_goscan"> |
<view class="default_goscan"> |
||||
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image> |
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image> |
||||
<button @click="goScan"> |
<button @click="goScan"> |
||||
<image src="@/static/icons_ui/icon_add.svg"></image> |
<image src="@/static/icons_ui/icon_add.svg"></image> |
||||
去扫描 |
{{ title }} |
||||
</button> |
</button> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
const props = defineProps({ |
||||
data() { |
title: { |
||||
return { |
type: String, |
||||
|
default: '去扫描' |
||||
} |
} |
||||
}, |
}) |
||||
created() { |
const goScan = (content) => { |
||||
|
emit('goScan', '') |
||||
}, |
} |
||||
methods: { |
// 传递给父类 |
||||
goScan(content) { |
const emit = defineEmits(['goScan']) |
||||
this.$emit("goScan", ''); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
|
<style></style> |
||||
<style> |
|
||||
</style> |
|
||||
|
@ -1,470 +1,482 @@ |
|||||
<template name="show-modal"> |
<template name="show-modal"> |
||||
<view> |
<view> |
||||
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false" |
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal"> |
||||
:showConfirmButton="false" ref="modal"> |
<view class="slot-content"> |
||||
<view class="slot-content"> |
<slot name="icon"> |
||||
<slot name="icon"> |
<image class="icon" :src="icon" /> |
||||
<image class="icon" :src="icon" /> |
</slot> |
||||
</slot> |
<slot name="content"> |
||||
<slot name="content"> |
<rich-text class="content" :nodes="content"> </rich-text> |
||||
<rich-text class="content" :nodes="content"> |
</slot> |
||||
</rich-text> |
<view class="split_line"></view> |
||||
|
<slot name="button"> |
||||
</slot> |
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px"> |
||||
<view class='split_line'></view> |
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> |
||||
<slot name="button"> |
<text :style="{ color: cancelColor }">{{ cancelText }}</text> |
||||
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> |
</view> |
||||
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> |
<u-line direction="col" length="100%"></u-line> |
||||
<text :style="{'color':cancelColor}">{{ cancelText }}</text> |
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> |
||||
</view> |
<text :style="{ color: confirmColor }">{{ confirmText }}</text> |
||||
<u-line direction="col" length="100%"></u-line> |
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> |
||||
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> |
</view> |
||||
<text :style="{'color':confirmColor}">{{confirmText}}</text> |
</view> |
||||
<text v-if="showConfirmCountdown">({{seconds}}s关闭)</text> |
</slot> |
||||
</view> |
</view> |
||||
</view> |
</u-modal> |
||||
</slot> |
</view> |
||||
</view> |
|
||||
</u-modal> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
/** |
/** |
||||
* modal 模态框 |
* modal 模态框 |
||||
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作 |
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作 |
||||
* */ |
* */ |
||||
import { |
import { ref, getCurrentInstance } from 'vue' |
||||
ref, |
|
||||
getCurrentInstance |
const timer = ref(null) |
||||
} from 'vue' |
const show = ref(false) // 是否显示 |
||||
const timer = ref(null) |
const iconType = ref('消息') |
||||
const show = ref(false) // 是否显示 |
const icon = ref('../../static/icons/error-circle.svg') |
||||
const iconType = ref('消息') |
const title = ref('') |
||||
const icon = ref('../../static/icons/error-circle.svg') |
const content = ref('') // 提示内容 |
||||
const title = ref('') |
const cancelText = ref('取消') // 取消按钮的文字 |
||||
const content = ref('') // 提示内容 |
const confirmText = ref('确定') // 确认按钮文字 |
||||
const cancelText = ref('取消') // 取消按钮的文字 |
const showCancel = ref(true) // 是否显示取消按钮,默认为 true |
||||
const confirmText = ref('确定') // 确认按钮文字 |
const confirmColor = ref('#007aff') // 确定按钮颜色 |
||||
const showCancel = ref(true) // 是否显示取消按钮,默认为 true |
const cancelColor = ref(null) // 取消按钮颜色 |
||||
const confirmColor = ref('#007aff') // 确定按钮颜色 |
const showConfirmButton = ref(true) // 是否显示确认按钮 |
||||
const cancelColor = ref(null) // 取消按钮颜色 |
const showConfirmCountdown = ref(true) // 是否显示确定倒计时 |
||||
const showConfirmButton = ref(true) // 是否显示确认按钮 |
const showCancelButton = ref(true) // 是否显示取消按钮 |
||||
const showConfirmCountdown = ref(true) // 是否显示确定倒计时 |
const showClose = ref(false) |
||||
const showCancelButton = ref(true) // 是否显示取消按钮 |
const confirm = ref(false) // 为 true 时,表示用户点击了确定按钮 |
||||
const showClose = ref(false) |
const cancel = ref(false) // 为 true 时,表示用户点击了取消 |
||||
const confirm = ref(false) //为 true 时,表示用户点击了确定按钮 |
const isDisabled = ref(true) // 为 true 时,表示用户可以点击,反之则不可以 |
||||
const cancel = ref(false) //为 true 时,表示用户点击了取消 |
const seconds = ref(0) |
||||
const isDisabled = ref(true) //为 true 时,表示用户可以点击,反之则不可以 |
const success = ref(() => {}) |
||||
const seconds = ref(0) |
const open = () => { |
||||
const success = () => { |
show.value = true |
||||
|
isDisabled.value = true |
||||
} |
} |
||||
const open = () => { |
const close = () => { |
||||
show.value = true; |
show.value = false |
||||
isDisabled.value = true; |
isDisabled.value = false |
||||
} |
} |
||||
const close = () => { |
const confirmClose = () => { |
||||
show.value = false |
if (!isDisabled.value) return |
||||
isDisabled.value = false; |
isDisabled.value = false |
||||
} |
// console.log('确定点击') |
||||
const confirmClose = () => { |
if (show.value) { |
||||
if (!isDisabled.value) return |
show.value = false |
||||
isDisabled.value = false |
clearInterval(timer.value) // 清空timer |
||||
// console.log('确定点击') |
success.value({ |
||||
if (show.value) { |
// cancel: false, |
||||
show.value = false; |
confirm: true |
||||
clearInterval(timer.value) //清空timer |
}) |
||||
success({ |
} |
||||
// cancel: false, |
} |
||||
confirm: true, |
const cancelClose = () => { |
||||
}); |
if (!isDisabled.value) return |
||||
} |
isDisabled.value = false |
||||
} |
clearInterval(timer.value) // 清空timer |
||||
const cancelClose = () => { |
show.value = false |
||||
if (!isDisabled.value) return |
success.value({ |
||||
isDisabled.value = false |
// cancel: true, |
||||
clearInterval(timer.value) //清空timer |
confirm: false |
||||
show.value = false |
}) |
||||
success({ |
} |
||||
// cancel: true, |
// 打开消息弹框(确定+倒计时) |
||||
confirm: false, |
const showMessage = (mContent, callback) => { |
||||
}); |
showConfirmCountdownModal('消息', mContent, callback) |
||||
} |
} |
||||
// 打开消息弹框(确定+倒计时) |
// 打开成功弹框(确定+倒计时) |
||||
const showMessage = (mContent, callback) => { |
const showSuccessMessage = (mContent, callback) => { |
||||
showConfirmCountdownModal("消息", mContent, callback); |
showConfirmCountdownModal('成功', mContent, callback) |
||||
} |
} |
||||
// 打开成功弹框(确定+倒计时) |
// 打开失败弹框(确定) |
||||
const showSuccessMessage = (mContent, callback) => { |
const showErrorMessage = (mContent, callback) => { |
||||
showConfirmCountdownModal("成功", mContent, callback); |
showConfirmModal('失败', mContent, callback) |
||||
} |
} |
||||
// 打开失败弹框(确定) |
|
||||
const showErrorMessage = (mContent, callback) => { |
// 显示崩溃消息(无确定) |
||||
|
const showBreakMessage = (mContent, callback) => { |
||||
console.log(333) |
showNoButtonModal('失败', mContent, callback) |
||||
showConfirmModal("失败", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开疑问弹框(取消+确定) |
||||
// 显示崩溃消息(无确定) |
const showQuestionMessage = (mContent, callback) => { |
||||
const showBreakMessage = (mContent, callback) => { |
showSelectModal('疑问', mContent, callback) |
||||
showNoButtonModal("失败", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开警告弹框(确定+倒计时) |
||||
// 打开疑问弹框(取消+确定) |
const showWarningMessage = (mContent, callback) => { |
||||
const showQuestionMessage = (mContent, callback) => { |
showConfirmCountdownModal('警告', mContent, callback) |
||||
showSelectModal("疑问", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开失败弹框(确定+倒计时) |
||||
// 打开警告弹框(确定+倒计时) |
const showConfirmCountdownFailModal = (mContent, callback) => { |
||||
const showWarningMessage = (mContent, callback) => { |
showConfirmCountdownModal('失败', mContent, callback) |
||||
showConfirmCountdownModal("警告", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开消息弹框(确定) |
||||
// 打开失败弹框(确定+倒计时) |
const showConfirmMessageModal = (mContent, callback) => { |
||||
const showConfirmCountdownFailModal = (mContent, callback) => { |
showConfirmModal('消息', mContent, callback) |
||||
showConfirmCountdownModal("失败", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开成功弹框(确定) |
||||
// 打开消息弹框(确定) |
const showConfirmSuccessModall = (mContent, callback) => { |
||||
const showConfirmMessageModal = (mContent, callback) => { |
showConfirmModal('成功', mContent, callback) |
||||
showConfirmModal("消息", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开警告弹框(确定) |
||||
// 打开成功弹框(确定) |
const showConfirmWarningModal = (mContent, callback) => { |
||||
const showConfirmSuccessModall = (mContent, callback) => { |
showConfirmModal('警告', mContent, callback) |
||||
showConfirmModal("成功", mContent, callback); |
} |
||||
} |
|
||||
|
// 打开疑问弹框(确定) |
||||
|
const showConfirmQuestionModal = (mContent, callback) => { |
||||
// 打开警告弹框(确定) |
showConfirmModal('疑问', mContent, callback) |
||||
const showConfirmWarningModal = (mContent, callback) => { |
} |
||||
showConfirmModal("警告", mContent, callback); |
|
||||
} |
// 初始化弹框并打开(确定) |
||||
|
const showNoButtonModal = (mIconType, mContent, callback) => { |
||||
// 打开疑问弹框(确定) |
showModal({ |
||||
const showConfirmQuestionModal = (mContent, callback) => { |
iconType: mIconType, |
||||
showConfirmModal("疑问", mContent, callback); |
content: mContent, |
||||
} |
showConfirmButton: false, |
||||
|
showCancelButton: false, |
||||
// 初始化弹框并打开(确定) |
success(res) { |
||||
const showNoButtonModal = (mIconType, mContent, callback) => { |
if (callback != undefined) { |
||||
showModal({ |
if (res.confirm == true) { |
||||
iconType: mIconType, |
callback(true) |
||||
content: mContent, |
} else { |
||||
showConfirmButton: false, |
callback(false) |
||||
showCancelButton: false, |
} |
||||
success: function(res) { |
} |
||||
if (callback != undefined) { |
} |
||||
if (res.confirm == true) { |
}) |
||||
callback(true); |
} |
||||
} else { |
// 初始化弹框并打开(确定) |
||||
callback(false); |
const showConfirmModal = (mIconType, mContent, callback) => { |
||||
} |
console.log(11) |
||||
} |
showModal({ |
||||
|
iconType: mIconType, |
||||
} |
content: mContent, |
||||
}); |
showCancelButton: false, |
||||
} |
success(res) { |
||||
// 初始化弹框并打开(确定) |
console.log(11, res) |
||||
const showConfirmModal = (mIconType, mContent, callback) => { |
if (callback != undefined) { |
||||
console.log(222) |
if (res.confirm == true) { |
||||
showModal({ |
callback(true) |
||||
iconType: mIconType, |
} else { |
||||
content: mContent, |
callback(false) |
||||
showCancelButton: false, |
} |
||||
success: function(res) { |
} |
||||
if (callback != undefined) { |
} |
||||
if (res.confirm == true) { |
}) |
||||
callback(true); |
} |
||||
} else { |
|
||||
callback(false); |
// 打开消息弹框(取消+确定) |
||||
} |
const showSelectMessageModal = (mContent, callback) => { |
||||
} |
showSelectModal('消息', mContent, callback) |
||||
|
} |
||||
} |
|
||||
}); |
// 打开成功弹框(取消+确定) |
||||
} |
const showSelectSuccessModal = (mContent, callback) => { |
||||
|
showSelectModal('成功', mContent, callback) |
||||
// 打开消息弹框(取消+确定) |
} |
||||
const showSelectMessageModal = (mContent, callback) => { |
|
||||
showSelectModal("消息", mContent, callback); |
// 打开失败弹框(取消+确定) |
||||
} |
const showSelectFailModal = (mContent, callback) => { |
||||
|
showSelectModal('失败', mContent, callback) |
||||
// 打开成功弹框(取消+确定) |
} |
||||
const showSelectSuccessModal = (mContent, callback) => { |
|
||||
showSelectModal("成功", mContent, callback); |
// 打开警告弹框(取消+确定) |
||||
} |
const showSelectWarningModal = (mContent, callback) => { |
||||
|
showSelectModal('警告', mContent, callback) |
||||
// 打开失败弹框(取消+确定) |
} |
||||
const showSelectFailModal = (mContent, callback) => { |
|
||||
showSelectModal("失败", mContent, callback); |
// 初始化弹框并打开(取消+确定) |
||||
} |
const showSelectModal = (mIconType, mContent, callback) => { |
||||
|
showModal({ |
||||
// 打开警告弹框(取消+确定) |
iconType: mIconType, |
||||
const showSelectWarningModal = (mContent, callback) => { |
content: mContent, |
||||
showSelectModal("警告", mContent, callback); |
success(res) { |
||||
} |
if (callback != undefined) { |
||||
|
if (res.confirm == true) { |
||||
// 初始化弹框并打开(取消+确定) |
callback(true) |
||||
const showSelectModal = (mIconType, mContent, callback) => { |
console.log('用户点击确定') |
||||
showModal({ |
} else { |
||||
iconType: mIconType, |
callback(false) |
||||
content: mContent, |
console.log('用户点击取消') |
||||
success: function(res) { |
} |
||||
if (callback != undefined) { |
} |
||||
if (res.confirm == true) { |
} |
||||
callback(true); |
}) |
||||
console.log('用户点击确定') |
} |
||||
} else { |
|
||||
callback(false); |
// 打开疑问弹框(确定+倒计时) |
||||
console.log('用户点击取消') |
const showConfirmCountdownQuestionModal = (mContent, callback) => { |
||||
} |
showConfirmCountdownModal('疑问', mContent, callback) |
||||
} |
} |
||||
|
|
||||
} |
// 初始化弹框并打开(确定+倒计时) |
||||
}); |
const showConfirmCountdownModal = (mIconType, mContent, callback) => { |
||||
} |
showModal({ |
||||
|
iconType: mIconType, |
||||
// 打开疑问弹框(确定+倒计时) |
content: mContent, |
||||
const showConfirmCountdownQuestionModal = (mContent, callback) => { |
showCancelButton: false, |
||||
showConfirmCountdownModal("疑问", mContent, callback); |
showConfirmCountdown: true, |
||||
} |
success(res) { |
||||
|
if (callback != undefined) { |
||||
// 初始化弹框并打开(确定+倒计时) |
if (res.confirm == true) { |
||||
const showConfirmCountdownModal = (mIconType, mContent, callback) => { |
callback(true) |
||||
showModal({ |
} else { |
||||
iconType: mIconType, |
callback(false) |
||||
content: mContent, |
} |
||||
showCancelButton: false, |
} |
||||
showConfirmCountdown: true, |
} |
||||
success: function(res) { |
}) |
||||
if (callback != undefined) { |
} |
||||
if (res.confirm == true) { |
|
||||
callback(true); |
// 打开消息弹框(取消+确定+倒计时) |
||||
} else { |
const showSelectCountdownMessageModal = (mContent, callback) => { |
||||
callback(false); |
showSelectCountdownModal('消息', mContent, callback) |
||||
} |
} |
||||
} |
|
||||
} |
// 打开成功弹框(取消+确定+倒计时) |
||||
}); |
const showSelectCountdownSuccessModal = (mContent, callback) => { |
||||
} |
showSelectCountdownModal('成功', mContent, callback) |
||||
|
} |
||||
// 打开消息弹框(取消+确定+倒计时) |
|
||||
const showSelectCountdownMessageModal = (mContent, callback) => { |
// 打开失败弹框(取消+确定+倒计时) |
||||
showSelectCountdownModal("消息", mContent, callback); |
const showSelectCountdownFailModal = (mContent, callback) => { |
||||
} |
showSelectCountdownModal('失败', mContent, callback) |
||||
|
} |
||||
// 打开成功弹框(取消+确定+倒计时) |
|
||||
const showSelectCountdownSuccessModal = (mContent, callback) => { |
// 打开警告弹框(取消+确定+倒计时) |
||||
showSelectCountdownModal("成功", mContent, callback); |
const showSelectCountdownWarningModal = (mContent, callback) => { |
||||
} |
showSelectCountdownModal('警告', mContent, callback) |
||||
|
} |
||||
// 打开失败弹框(取消+确定+倒计时) |
|
||||
const showSelectCountdownFailModal = (mContent, callback) => { |
// 打开疑问弹框(取消+确定+倒计时) |
||||
showSelectCountdownModal("失败", mContent, callback); |
const showSelectCountdownQuestionModal = (mContent, callback) => { |
||||
} |
showSelectCountdownModal('疑问', mContent, callback) |
||||
|
} |
||||
// 打开警告弹框(取消+确定+倒计时) |
|
||||
const showSelectCountdownWarningModal = (mContent, callback) => { |
// 初始化弹框并打开(取消+确定+倒计时) |
||||
showSelectCountdownModal("警告", mContent, callback); |
const showSelectCountdownModal = (mIconType, mContent, callback) => { |
||||
} |
showModal({ |
||||
|
iconType: mIconType, |
||||
// 打开疑问弹框(取消+确定+倒计时) |
content: mContent, |
||||
const showSelectCountdownQuestionModal = (mContent, callback) => { |
showConfirmCountdown: true, |
||||
showSelectCountdownModal("疑问", mContent, callback); |
success(res) { |
||||
} |
if (callback != undefined) { |
||||
|
if (res.confirm == true) { |
||||
// 初始化弹框并打开(取消+确定+倒计时) |
callback(true) |
||||
const showSelectCountdownModal = (mIconType, mContent, callback) => { |
console.log('用户点击确定') |
||||
showModal({ |
} else { |
||||
iconType: mIconType, |
callback(false) |
||||
content: mContent, |
console.log('用户点击取消') |
||||
showConfirmCountdown: true, |
} |
||||
success: function(res) { |
} |
||||
if (callback != undefined) { |
} |
||||
if (res.confirm == true) { |
}) |
||||
callback(true); |
} |
||||
console.log('用户点击确定') |
|
||||
} else { |
// 初始化弹框并打开 |
||||
callback(false); |
const showModal = (data) => { |
||||
console.log('用户点击取消') |
if (data.iconType) { |
||||
} |
iconType.value = data.iconType |
||||
} |
switch (data.iconType) { |
||||
} |
case '消息': |
||||
}); |
icon.value = '/static/icons/error-circle.svg' |
||||
} |
break |
||||
|
case '成功': |
||||
// 初始化弹框并打开 |
icon.value = '/static/icons/checkmark-circle.svg' |
||||
const showModal = (data) => { |
break |
||||
if (data.iconType) { |
case '失败': |
||||
iconType.value = data.iconType |
icon.value = '/static/icons/close-circle.svg' |
||||
switch (data.iconType) { |
break |
||||
case '消息': |
case '警告': |
||||
icon.value = '/static/icons/error-circle.svg'; |
icon.value = '/static/icons/warning.svg' |
||||
break; |
break |
||||
case '成功': |
case '疑问': |
||||
icon.value = '/static/icons/checkmark-circle.svg'; |
icon.value = '/static/icons/question-circle.svg' |
||||
break; |
break |
||||
case '失败': |
default: |
||||
icon.value = '/static/icons/close-circle.svg'; |
break |
||||
break; |
} |
||||
case '警告': |
} |
||||
icon.value = '/static/icons/warning.svg'; |
// image |
||||
break; |
if (data.title) { |
||||
case '疑问': |
title.value = data.title |
||||
icon.value = '/static/icons/question-circle.svg'; |
} |
||||
break; |
if (data.content) { |
||||
default: |
content.value = data.content |
||||
break; |
} else { |
||||
} |
content.value = '' |
||||
} |
} |
||||
// image |
if (data.cancelText) { |
||||
if (data.title) { |
cancelText.value = data.cancelText |
||||
title.value = data.title |
} else { |
||||
} |
cancelText.value = '取消' |
||||
if (data.content) { |
} |
||||
content.value = data.content |
if (data.confirmText) { |
||||
} else { |
confirmText.value = data.confirmText |
||||
content.value = '' |
} else { |
||||
} |
confirmText.value = '确定' |
||||
if (data.cancelText) { |
} |
||||
cancelText.value = data.cancelText |
|
||||
} else { |
if (data.showCancel === false || data.showCancel === true) { |
||||
cancelText.value = '取消' |
showCancel.value = data.showCancel |
||||
} |
} else { |
||||
if (data.confirmText) { |
showCancel.value = true |
||||
confirmText.value = data.confirmText |
} |
||||
} else { |
|
||||
confirmText.value = '确定' |
if (data.confirmColor) { |
||||
} |
confirmColor.value = data.confirmColor |
||||
|
} else { |
||||
if (data.showCancel === false || data.showCancel === true) { |
confirmColor.value = '#007aff' |
||||
showCancel.value = data.showCancel |
} |
||||
} else { |
|
||||
showCancel.value = true |
if (data.cancelColor) { |
||||
} |
cancelColor.value = data.cancelColor |
||||
|
} else { |
||||
if (data.confirmColor) { |
cancelColor.value = '#666F83' |
||||
confirmColor.value = data.confirmColor |
} |
||||
} else { |
|
||||
confirmColor.value = '#007aff' |
if (data.showConfirmButton === false || data.showConfirmButton === true) { |
||||
} |
showConfirmButton.value = data.showConfirmButton |
||||
|
} else { |
||||
if (data.cancelColor) { |
showConfirmButton.value = true |
||||
cancelColor.value = data.cancelColor |
} |
||||
} else { |
|
||||
cancelColor.value = '#666F83' |
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) { |
||||
} |
showConfirmCountdown.value = data.showConfirmCountdown |
||||
|
} else { |
||||
if (data.showConfirmButton === false || data.showConfirmButton === true) { |
showConfirmCountdown.value = false |
||||
showConfirmButton.value = data.showConfirmButton |
} |
||||
} else { |
|
||||
showConfirmButton.value = true |
if (data.showCancelButton === false || data.showCancelButton === true) { |
||||
} |
showCancelButton.value = data.showCancelButton |
||||
|
} else { |
||||
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) { |
showCancelButton.value = true |
||||
showConfirmCountdown.value = data.showConfirmCountdown |
} |
||||
} else { |
if (data.success) { |
||||
showConfirmCountdown.value = false |
success.value = data.success |
||||
} |
} else { |
||||
|
success.value = () => {} |
||||
if (data.showCancelButton === false || data.showCancelButton === true) { |
} |
||||
showCancelButton.value = data.showCancelButton |
setTimeout((res) => { |
||||
} else { |
open() |
||||
showCancelButton.value = true |
}, 500) |
||||
} |
if (showConfirmCountdown.value) { |
||||
|
startTimer() |
||||
if (data.success) { |
} |
||||
success = data.success |
} |
||||
} else { |
|
||||
success = () => {} |
const startTimer = () => { |
||||
} |
seconds.value = 3 |
||||
setTimeout(res => { |
clearInterval(timer.value) |
||||
open(); |
timer.value = setInterval(() => { |
||||
}, 500) |
seconds.value-- |
||||
if (showConfirmCountdown.value) { |
// console.log("倒计时时间", this.seconds); |
||||
startTimer(); |
if (seconds.value <= 0) { |
||||
} |
timeUp() |
||||
|
} |
||||
} |
}, 1000) |
||||
|
} |
||||
const startTimer = () => { |
|
||||
seconds.value = 3; |
const timeUp = () => { |
||||
clearInterval(timer.value) |
// clearInterval(this.timer) |
||||
timer.value = setInterval(() => { |
confirmClose() |
||||
seconds.value-- |
} |
||||
// console.log("倒计时时间", this.seconds); |
defineExpose({ |
||||
if (seconds.value <= 0) { |
confirmClose, |
||||
timeUp() |
cancelClose, |
||||
return |
showSuccessMessage, |
||||
} |
showErrorMessage, |
||||
}, 1000) |
showBreakMessage, |
||||
} |
showQuestionMessage, |
||||
|
showWarningMessage, |
||||
const timeUp = () => { |
showConfirmCountdownFailModal, |
||||
// clearInterval(this.timer) |
showConfirmMessageModal, |
||||
console.log('时间到') |
showConfirmSuccessModall, |
||||
confirmClose(); |
showConfirmWarningModal, |
||||
} |
showConfirmQuestionModal, |
||||
defineExpose({ showErrorMessage }) // 提供 open 方法,用于打开弹窗 |
showNoButtonModal, |
||||
|
showConfirmModal, |
||||
|
showSelectMessageModal, |
||||
|
showSelectSuccessModal, |
||||
|
showSelectFailModal, |
||||
|
showSelectWarningModal, |
||||
|
showSelectModal, |
||||
|
showConfirmCountdownQuestionModal, |
||||
|
showConfirmCountdownModal, |
||||
|
showSelectCountdownMessageModal, |
||||
|
showSelectCountdownSuccessModal, |
||||
|
showSelectCountdownFailModal, |
||||
|
showSelectCountdownWarningModal, |
||||
|
showSelectCountdownQuestionModal, |
||||
|
showMessage, |
||||
|
showModal |
||||
|
}) |
||||
</script> |
</script> |
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.slot-content { |
.slot-content { |
||||
font-size: 36rpx; |
font-size: 36rpx; |
||||
display: flex; //弹性布局 |
display: flex; //弹性布局 |
||||
flex-direction: column; //垂直排列 |
flex-direction: column; //垂直排列 |
||||
align-items: center; //子元素居中 |
align-items: center; //子元素居中 |
||||
// background-image: url() |
// background-image: url() |
||||
} |
} |
||||
|
|
||||
.icon { |
.icon { |
||||
width: 70rpx; |
width: 70rpx; |
||||
height: 70rpx; |
height: 70rpx; |
||||
opacity: 1; //透明度 |
opacity: 1; //透明度 |
||||
margin-top: 16px; |
margin-top: 16px; |
||||
} |
} |
||||
|
|
||||
.title { |
.title { |
||||
font-size: 35rpx; |
font-size: 35rpx; |
||||
} |
} |
||||
|
|
||||
.content { |
.content { |
||||
width: 100%; |
width: 100%; |
||||
margin-top: 16px; |
margin-top: 16px; |
||||
margin-bottom: 16px; |
margin-bottom: 16px; |
||||
margin-left: 8px; |
margin-left: 8px; |
||||
margin-right: 8px; |
margin-right: 8px; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
text-align: center; |
text-align: center; |
||||
} |
} |
||||
|
|
||||
.cance_button { |
.cance_button { |
||||
width: 100%; |
width: 100%; |
||||
margin-top: 10px; |
margin-top: 10px; |
||||
margin-bottom: 10px; |
margin-bottom: 10px; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
display: flex; |
display: flex; |
||||
justify-content: center; |
justify-content: center; |
||||
align-items: center; |
align-items: center; |
||||
} |
} |
||||
|
|
||||
.confirm_button { |
.confirm_button { |
||||
width: 100%; |
width: 100%; |
||||
margin-top: 10px; |
margin-top: 10px; |
||||
margin-bottom: 10px; |
margin-bottom: 10px; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
display: flex; |
display: flex; |
||||
justify-content: center; |
justify-content: center; |
||||
align-items: center; |
align-items: center; |
||||
} |
} |
||||
|
|
||||
.confirm_text { |
.confirm_text { |
||||
// color: $uni-color-primary; |
// color: $uni-color-primary; |
||||
} |
} |
||||
|
|
||||
.def_text { |
.def_text { |
||||
color: $uni-color-primary; |
color: $uni-color-primary; |
||||
} |
} |
||||
</style> |
</style> |
@ -1,68 +1,57 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
||||
padding-bottom: 15rpx; |
<text style="font-size: 35rpx">{{ title }} </text> |
||||
padding-left: 10rpx; |
<view class="uni-flex u-col-center" @click="showLocation"> |
||||
padding-right: 10rpx; |
<text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">  请扫描</text> |
||||
font-size:32rpx;"> |
<text style="color: #3fbaff; font-size: 35rpx">  {{ containerCode }}</text> |
||||
<text style="font-size: 35rpx;">{{title}} </text> |
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image> |
||||
<view class="uni-flex u-col-center" @click="showLocation"> |
</view> |
||||
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">  请扫描</text> |
<winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer> |
||||
<text style="color:#3FBAFF; font-size: 35rpx;">  {{containerCode}}</text> |
</view> |
||||
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|
||||
</view> |
|
||||
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue" |
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
||||
|
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue' |
||||
|
|
||||
export default { |
const defaultContainerCode = ref('') |
||||
components: { |
const props = defineProps({ |
||||
winScanContainer |
title: { |
||||
}, |
type: String, |
||||
data() { |
default: '需求库位' |
||||
return { |
}, |
||||
defaultContainerCode: "" |
containerCode: { |
||||
} |
type: String, |
||||
}, |
default: '' |
||||
props: { |
}, |
||||
title: { |
isShowEdit: { |
||||
type: String, |
type: Boolean, |
||||
default: "需求库位" |
default: true |
||||
}, |
} |
||||
containerCode: { |
}) |
||||
type: String, |
watch( |
||||
default: "" |
() => props.containerCode, |
||||
}, |
(val) => { |
||||
isShowEdit: { |
if (val != '') { |
||||
type: Boolean, |
defaultContainerCode.value = val |
||||
default: true |
} |
||||
}, |
}, |
||||
}, |
{ |
||||
|
immediate: true, |
||||
|
deep: true |
||||
|
} |
||||
|
) |
||||
|
|
||||
watch: { |
const showLocation = () => { |
||||
containerCode: { |
scanContainer.value.openScanPopup() |
||||
handler(newName, oldName) { |
} |
||||
if (this.containerCode != "") { |
// 扫描源库位 |
||||
this.defaultContainerCode = this.containerCode; |
const getContainer = (containerInfo) => { |
||||
} |
emit('getContainer', containerInfo) |
||||
}, |
} |
||||
immediate: true, |
|
||||
deep: true |
// 传递给父类 |
||||
} |
const emit = defineEmits(['getContainer']) |
||||
}, |
|
||||
methods: { |
|
||||
showLocation() { |
|
||||
this.$refs.scanContainer.openScanPopup(); |
|
||||
}, |
|
||||
//扫描源库位 |
|
||||
getContainer(containerInfo) { |
|
||||
this.$emit("getContainer", containerInfo) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,163 +1,145 @@ |
|||||
<template> |
<template> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<uni-collapse ref="collapse1" @change=""> |
<u-collapse ref="collapse"> |
||||
<uni-collapse-item :open="true"> |
<u-collapse-item :open="true"> |
||||
<template v-slot:title> |
<template v-slot:title> |
||||
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty> |
||||
:isShowStdPack="false"> |
</template> |
||||
</item-compare-qty> |
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)"> |
||||
</template> |
<recommend :detail="item" :isShowToLocation="false"> </recommend> |
||||
|
</u-swipe-action> |
||||
<view class="" v-for="(item,index) in dataContent.subList" :key="index"> |
</u-collapse-item> |
||||
<uni-swipe-action ref="swipeAction"> |
</u-collapse> |
||||
<uni-swipe-action-item @click="swipeClick($event,item)" |
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
||||
:right-options="item.scaned?scanOptions:detailOptions" |
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
||||
style='padding:0px 0px 5px 0px;align-items: center;'> |
<com-message ref="comMessageRef" /> |
||||
<recommend :detail="item" :isShowToLocation="false"> |
</view> |
||||
</recommend> |
|
||||
</uni-swipe-action-item> |
|
||||
</uni-swipe-action> |
|
||||
</view> |
|
||||
</uni-collapse-item> |
|
||||
</uni-collapse> |
|
||||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|
||||
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' |
|
||||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|
||||
<comMessage ref="message"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
||||
import recommend from '@/mycomponents/recommend/recommend.vue' |
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
||||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
import recommend from '@/mycomponents/recommend/recommend.vue' |
||||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
||||
import { |
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
||||
getDetailOption, |
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js' |
||||
getPurchaseReceiptOption |
|
||||
} from '@/common/array.js'; |
|
||||
|
|
||||
export default { |
|
||||
emits: ['openDetail', "updateData"], |
|
||||
components: { |
|
||||
itemCompareQty, |
|
||||
recommend, |
|
||||
balanceQtyEdit, |
|
||||
winScanLocation |
|
||||
}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: null |
|
||||
}, |
|
||||
settingParam: { |
|
||||
type: Object, |
|
||||
default: null |
|
||||
}, |
|
||||
isShowPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowBatch: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
locationAreaTypeList: { |
|
||||
type: Array, |
|
||||
default: null |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
dataContent: { |
|
||||
handler(newName, oldName) { |
|
||||
if (this.dataContent.subList.length > 0) { |
|
||||
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { |
|
||||
this.$nextTick(res => { |
|
||||
this.$refs.collapse1.resize() |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
immediate: true, |
|
||||
deep: true |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
data() { |
|
||||
return { |
|
||||
option: [], |
|
||||
showItem: {}, |
|
||||
locatonItem: {}, |
|
||||
editItem: {}, |
|
||||
detailOptions: [], |
|
||||
scanOptions: [] |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mounted() { |
|
||||
if (this.detailOptions.length == 0) { |
|
||||
this.detailOptions = getDetailOption(); |
|
||||
} |
|
||||
if (this.scanOptions.length == 0) { |
|
||||
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam |
|
||||
.allowModifyLocation) |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
swipeClick(e, item) { |
|
||||
if (e.content.text == "详情") { |
|
||||
this.detail(item) |
|
||||
} else if (e.content.text == "编辑") { |
|
||||
this.edit(item) |
|
||||
} else if (e.content.text == "库位") { |
|
||||
this.showLocation(item) |
|
||||
} else if (e.content.text == "移除") { |
|
||||
this.remove(item) |
|
||||
} |
|
||||
}, |
|
||||
edit(item) { |
|
||||
this.editItem = item; |
|
||||
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty); |
|
||||
}, |
|
||||
|
|
||||
detail(item) { |
const props = defineProps({ |
||||
this.$emit('openDetail', item); |
dataContent: { |
||||
// this.showItem = item; |
type: Object, |
||||
// this.$refs.jobDetailPopup.openPopup(item) |
default: null |
||||
}, |
}, |
||||
remove(item) { |
settingParam: { |
||||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
type: Object, |
||||
res => { |
default: null |
||||
if (res) { |
}, |
||||
item.scaned = false |
isShowPack: { |
||||
item.balance = {} |
type: Boolean, |
||||
item.handleQty = null; |
default: true |
||||
this.$forceUpdate() |
}, |
||||
this.$emit('remove', item) |
isShowBatch: { |
||||
} |
type: Boolean, |
||||
}); |
default: true |
||||
}, |
}, |
||||
confirm(qty) { |
isShowLocation: { |
||||
this.editItem.handleQty = qty; |
type: Boolean, |
||||
this.$emit('updateData') |
default: true |
||||
}, |
}, |
||||
showLocation(item) { |
locationAreaTypeList: { |
||||
this.locatonItem = item; |
type: Array, |
||||
this.$refs.scanLocationCode.openScanPopup(); |
default: null |
||||
}, |
} |
||||
//扫描源库位 |
}) |
||||
getLocation(location, code) { |
const option = ref([]) |
||||
this.locatonItem.toLocationCode = code; |
const showItem = ref({}) |
||||
this.$emit('updateData') |
const editItem = ref({}) |
||||
}, |
const locatonItem = ref({}) |
||||
} |
const detailOptions = ref([]) |
||||
} |
const scanOptions = ref([]) |
||||
|
const comMessageRef = ref() |
||||
|
const collapse = ref() |
||||
|
const qtyEdit = ref() |
||||
|
const dataContent = ref(props.dataContent) |
||||
|
dataContent.value.subList.forEach((item) => { |
||||
|
item.show = false |
||||
|
}) |
||||
|
// 监视属性 |
||||
|
watch( |
||||
|
() => props.dataContent, |
||||
|
(val) => { |
||||
|
if (val.subList.length > 0) { |
||||
|
if (collapse.value != undefined && collapse.value != null) { |
||||
|
nextTick((res) => { |
||||
|
collapse.value.init() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
immediate: true, |
||||
|
deep: true |
||||
|
} |
||||
|
) |
||||
|
onMounted(() => { |
||||
|
if (detailOptions.value.length == 0) { |
||||
|
detailOptions.value = getDetailOption() |
||||
|
} |
||||
|
if (scanOptions.value.length == 0) { |
||||
|
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation) |
||||
|
} |
||||
|
nextTick((res) => { |
||||
|
collapse.value.init() |
||||
|
}) |
||||
|
}) |
||||
|
const swipeClick = (params, item) => { |
||||
|
let text = '' |
||||
|
if (item.scaned) { |
||||
|
text = scanOptions.value[params[1]].text |
||||
|
} else { |
||||
|
text = detailOptions.value[params[1]].text |
||||
|
} |
||||
|
if (text == '详情') { |
||||
|
detail(item) |
||||
|
} else if (text == '编辑') { |
||||
|
edit(item) |
||||
|
} else if (text == '库位') { |
||||
|
showLocation(item) |
||||
|
} else if (text == '移除') { |
||||
|
remove(item) |
||||
|
} |
||||
|
} |
||||
|
const edit = (item) => { |
||||
|
editItem.value = item |
||||
|
qtyEdit.value.openEditPopup(item.balance, item.handleQty) |
||||
|
} |
||||
|
const detail = (item) => { |
||||
|
emit('openDetail', item) |
||||
|
} |
||||
|
const remove = (item) => { |
||||
|
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
||||
|
if (res) { |
||||
|
item.scaned = false |
||||
|
item.balance = {} |
||||
|
item.handleQty = null |
||||
|
emit('remove', item) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
const confirm = (qty) => { |
||||
|
editItem.value.handleQty = qty |
||||
|
emit('updateData') |
||||
|
} |
||||
|
const showLocation = () => { |
||||
|
locatonItem.value = item |
||||
|
scanLocationCode.value.openScanPopup() |
||||
|
} |
||||
|
// 扫描源库位 |
||||
|
const getLocation = () => { |
||||
|
locatonItem.value.LocationCode = code |
||||
|
emit('updateData') |
||||
|
} |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['openDetail', 'remove', 'updateData']) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,161 +1,125 @@ |
|||||
<template> |
<template> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<uni-collapse ref="collapse"> |
<u-collapse ref="collapse"> |
||||
<uni-collapse-item :open="true"> |
<u-collapse-item :open="true"> |
||||
<template v-slot:title> |
<template v-slot:title> |
||||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty> |
||||
:isShowPackUnit="true"></itemCompareQty> |
</template> |
||||
</template> |
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"></package-list> |
||||
<package-list :dataContent="dataContent.subList" |
</u-collapse-item> |
||||
:isEdit="settingParam.allowModifyQty=='TRUE'" |
</u-collapse> |
||||
:settingParam="settingParam" |
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit> |
||||
@collapseChange="collapseChange" |
<com-message ref="comMessageRef" /> |
||||
@updateData="updateData" |
</view> |
||||
></package-list> |
|
||||
</uni-collapse-item> |
|
||||
</uni-collapse> |
|
||||
|
|
||||
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> |
|
||||
</recommend-qty-edit> |
|
||||
<comMessage ref="message"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
||||
import recommend from '@/mycomponents/recommend/recommend.vue' |
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
||||
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
import recommend from '@/mycomponents/recommend/recommend.vue' |
||||
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' |
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
||||
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue' |
import packageList from '@/mycomponents/package/packageList.vue' |
||||
import pack from '@/mycomponents/balance/pack.vue' |
|
||||
import detailList from '@/mycomponents/detail/detailList.vue' |
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js' |
||||
import packageList from '@/mycomponents/package/packageList.vue' |
|
||||
|
const props = defineProps({ |
||||
import { |
dataContent: { |
||||
getDetailOption, |
type: Object, |
||||
getPurchaseReceiptOption |
default: null |
||||
} from '@/common/array.js'; |
}, |
||||
|
settingParam: { |
||||
export default { |
type: Object, |
||||
emits: ["updateData"], |
default: null |
||||
components: { |
}, |
||||
itemCompareQty, |
locationAreaTypeList: { |
||||
recommend, |
type: Object, |
||||
recommendQtyEdit, |
default: null |
||||
jobDetailPopup, |
} |
||||
receiptDetailInfoPopup, |
}) |
||||
detailList, |
const showItem = ref({}) |
||||
packageList |
const editItem = ref({ |
||||
}, |
record: {} |
||||
props: { |
}) |
||||
dataContent: { |
const locatonItem = ref({}) |
||||
type: Object, |
const detailOptions = ref([]) |
||||
default: null |
const scanOptions = ref([]) |
||||
}, |
const comMessageRef = ref() |
||||
settingParam: { |
const collapse = ref() |
||||
type: Object, |
const receiptEdit = ref() |
||||
default: null |
// 监视属性 |
||||
}, |
watch( |
||||
locationAreaTypeList: { |
() => props.dataContent, |
||||
type: Object, |
(val) => { |
||||
default: null |
if (val.subList.length > 0) { |
||||
}, |
if (collapse.value != undefined && collapse.value != null) { |
||||
|
nextTick((res) => { |
||||
|
collapse.value.init() |
||||
}, |
}) |
||||
watch: { |
} |
||||
|
} |
||||
}, |
}, |
||||
|
{ |
||||
data() { |
deep: true |
||||
return { |
} |
||||
showItem: {}, |
) |
||||
editItem: { |
onMounted(() => { |
||||
record: { |
if (detailOptions.value.length == 0) { |
||||
|
detailOptions.value = getDetailOption() |
||||
} |
} |
||||
}, |
if (scanOptions.value.length == 0) { |
||||
locatonItem: {}, |
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation) |
||||
detailOptions: [], |
} |
||||
scanOptions: [] |
}) |
||||
} |
|
||||
}, |
const collapseChange = () => { |
||||
|
setTimeout(() => { |
||||
mounted() { |
resizeCollapse() |
||||
if (this.detailOptions.length == 0) { |
}, 500) |
||||
this.detailOptions = getDetailOption(); |
} |
||||
} |
const resizeCollapse = (object) => { |
||||
if (this.scanOptions.length == 0) { |
nextTick(() => { |
||||
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam |
collapse.value.init() |
||||
.allowModifyLocation) |
}) |
||||
} |
} |
||||
|
const refreshCollapse = () => { |
||||
|
nextTick((r) => { |
||||
}, |
collapse.value.forEach((r) => { |
||||
|
r.childrens.forEach((i) => { |
||||
updated() { |
i.init() |
||||
console.log('updated') |
}) |
||||
}, |
r.init() |
||||
|
}) |
||||
methods: { |
}) |
||||
collapseChange(){ |
} |
||||
setTimeout(() => { |
const swipeClick = (e, item) => { |
||||
this.resizeCollapse(); |
if (e.content.text == '编辑') { |
||||
}, 500) |
edit(item) |
||||
}, |
} else if (e.content.text == '移除') { |
||||
|
remove(item) |
||||
resizeCollapse() { |
} |
||||
this.$nextTick(r => { |
} |
||||
this.$refs.collapse.resize() |
const edit = (item) => { |
||||
}); |
editItem = item |
||||
this.$forceUpdate(); |
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty) |
||||
}, |
} |
||||
|
const remove = (item) => { |
||||
|
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
||||
refreshCollapse() { |
if (res) { |
||||
this.$nextTick(r => { |
item.scaned = false |
||||
this.$refs.collapse.forEach(r => { |
item.handleQty = null |
||||
r.childrens.forEach(i => { |
emit('remove', item) |
||||
i.init(); |
} |
||||
}) |
}) |
||||
r.resize(); |
} |
||||
}) |
const confirm = (qty) => { |
||||
}); |
editItem.value.handleQty = qty |
||||
this.$forceUpdate(); |
emit('updateData') |
||||
}, |
} |
||||
|
const updateData = () => { |
||||
swipeClick(e, item) { |
emit('updateData') |
||||
if (e.content.text == "编辑") { |
} |
||||
this.edit(item) |
// 传递给父类 |
||||
} else if (e.content.text == "移除") { |
const emit = defineEmits(['remove', 'updateData']) |
||||
this.remove(item) |
|
||||
} |
|
||||
}, |
|
||||
edit(item) { |
|
||||
this.editItem = item; |
|
||||
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); |
|
||||
}, |
|
||||
remove(item) { |
|
||||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|
||||
res => { |
|
||||
if (res) { |
|
||||
item.scaned = false |
|
||||
item.handleQty = null |
|
||||
this.$forceUpdate() |
|
||||
this.$emit('remove', item) |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
confirm(qty) { |
|
||||
this.editItem.handleQty = qty; |
|
||||
this.$emit('updateData') |
|
||||
}, |
|
||||
updateData(){ |
|
||||
this.$emit('updateData') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,150 +1,135 @@ |
|||||
<template> |
<template> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem"> |
<u-collapse ref="collapse"> |
||||
</comReturnRequestInfo> --> |
<u-collapse-item :open="true"> |
||||
<uni-collapse ref="collapse1" @change=""> |
<template v-slot:title> |
||||
<uni-collapse-item :open="true"> |
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" style="flex: 1"> </item-compare-qty> |
||||
<template v-slot:title> |
</template> |
||||
<item-compare-qty |
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)"> |
||||
:dataContent="dataContent" |
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" :isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend> |
||||
:handleQty="Number(dataContent.handleQty)" |
</u-swipe-action> |
||||
:isShowStdPack="false"> |
</u-collapse-item> |
||||
</item-compare-qty> |
</u-collapse> |
||||
</template> |
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
||||
<view class="" v-for="(item,index) in dataContent.subList"> |
<com-message ref="comMessageRef" /> |
||||
<uni-swipe-action ref="swipeAction"> |
</view> |
||||
<uni-swipe-action-item @click="swipeClick($event,item)" |
|
||||
:right-options="item.scaned?scanOptions:detailOptions"> |
|
||||
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" |
|
||||
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend> |
|
||||
</uni-swipe-action-item> |
|
||||
</uni-swipe-action> |
|
||||
</view> |
|
||||
</uni-collapse-item> |
|
||||
</uni-collapse> |
|
||||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|
||||
<comMessage ref="message"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
import { ref, getCurrentInstance, onMounted, watch, nextTick } from 'vue' |
||||
import recommend from '@/mycomponents/recommend/recommend.vue' |
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
||||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
import recommend from '@/mycomponents/recommend/recommend.vue' |
||||
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue' |
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
||||
import { |
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue' |
||||
getDetailOption, |
import { getDetailOption, getDetailEditRemoveOption, getDetailRemoveOption } from '@/common/array.js' |
||||
getDetailEditRemoveOption, |
|
||||
getDetailRemoveOption |
|
||||
} from '@/common/array.js'; |
|
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
emits: ['openDetail'], |
dataContent: { |
||||
components: { |
type: Object, |
||||
itemCompareQty, |
default: {} |
||||
recommend, |
}, |
||||
balanceQtyEdit, |
settingParam: { |
||||
comReturnRequestInfo |
type: Object, |
||||
}, |
default: {} |
||||
props: { |
}, |
||||
dataContent: { |
isShowPack: { |
||||
type: Object, |
type: Boolean, |
||||
default: {} |
default: true |
||||
}, |
}, |
||||
settingParam: { |
isShowBatch: { |
||||
type: Object, |
type: Boolean, |
||||
default: {} |
default: true |
||||
}, |
}, |
||||
isShowPack: { |
isShowLocation: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: true |
default: true |
||||
}, |
} |
||||
isShowBatch: { |
}) |
||||
type: Boolean, |
const option = ref([]) |
||||
default: true |
const showItem = ref({}) |
||||
}, |
const editItem = ref({ |
||||
isShowLocation: { |
record: {} |
||||
type: Boolean, |
}) |
||||
default: true |
const detailOptions = ref([]) |
||||
}, |
const scanOptions = ref([]) |
||||
}, |
const requestItem = ref({}) |
||||
watch: { |
const qtyEdit = ref() |
||||
dataContent(newVal) { |
const comMessageRef = ref() |
||||
var test =this.dataContent |
const dataContent = ref([]) |
||||
this.requestItem = newVal.subList[0]; |
const collapse = ref() |
||||
}, |
dataContent.value = props.dataContent |
||||
}, |
dataContent.value.subList.forEach((item) => { |
||||
|
item.show = false |
||||
data() { |
}) |
||||
return { |
onMounted(() => { |
||||
option: [], |
if (detailOptions.value.length == 0) { |
||||
showItem: {}, |
detailOptions.value = getDetailOption() |
||||
editItem: { |
} |
||||
record: { |
if (scanOptions.value.length == 0) { |
||||
|
scanOptions.value = getDetailEditRemoveOption() |
||||
} |
} |
||||
}, |
}) |
||||
detailOptions: [], |
// 监视属性 |
||||
scanOptions: [], |
watch( |
||||
requestItem:{} |
() => props.dataContent, |
||||
} |
(val) => { |
||||
}, |
requestItem.value = val.subList[0] |
||||
|
dataContent.value = val |
||||
mounted() { |
dataContent.value.subList.forEach((item) => { |
||||
if (this.detailOptions.length == 0) { |
item.show = false |
||||
this.detailOptions = getDetailOption(); |
}) |
||||
} |
nextTick(() => { |
||||
if (this.scanOptions.length == 0) { |
collapse.value.init() |
||||
this.scanOptions = getDetailEditRemoveOption(); |
}) |
||||
// if (this.dataContent.allowModifyQty == 1) { |
}, |
||||
// this.scanOptions = getDetailEditRemoveOption(); |
{ |
||||
// } else { |
immediate: true, |
||||
// this.scanOptions = getDetailRemoveOption(); |
deep: true |
||||
// } |
} |
||||
} |
) |
||||
}, |
const swipeClick = (params, item) => { |
||||
|
let text = '' |
||||
methods: { |
if (item.scaned) { |
||||
swipeClick(e, item) { |
text = scanOptions.value[params[1]].text |
||||
if (e.content.text == "详情") { |
} else { |
||||
this.detail(item) |
text = detailOptions.value[params[1]].text |
||||
} else if (e.content.text == "编辑") { |
} |
||||
this.edit(item) |
if (text == '详情') { |
||||
} else if (e.content.text == "移除") { |
detail(item) |
||||
this.remove(item) |
} else if (text == '编辑') { |
||||
} |
edit(item) |
||||
}, |
} else if (text == '移除') { |
||||
edit(item) { |
remove(item) |
||||
this.editItem = item; |
} |
||||
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty); |
} |
||||
}, |
const edit = (item) => { |
||||
|
editItem.value = item |
||||
detail(item) { |
qtyEdit.value.openEditPopup(item.balance, item.record.qty) |
||||
this.$emit('openDetail', item); |
} |
||||
// this.showItem = item; |
const detail = (item) => { |
||||
// this.$refs.jobDetailPopup.openPopup(item) |
emit('openDetail', item) |
||||
}, |
} |
||||
remove(item) { |
const remove = (item) => { |
||||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
||||
res => { |
if (res) { |
||||
if (res) { |
item.scaned = false |
||||
item.scaned = false |
item.record = {} |
||||
item.record = {} |
item.balance = {} |
||||
item.balance = {} |
item.inventoryStatus = item.RecommendInventoryStatus |
||||
item.inventoryStatus = item.RecommendInventoryStatus |
emit('remove', item) |
||||
// item.record.qty = 0; |
} |
||||
this.$forceUpdate() |
}) |
||||
this.$emit('remove', item) |
} |
||||
} |
const confirm = (qty) => { |
||||
}); |
editItem.value.record.qty = qty |
||||
}, |
emit('updateData') |
||||
confirm(qty) { |
} |
||||
this.editItem.record.qty = qty; |
// 传递给父类 |
||||
this.$emit('updateData') |
const emit = defineEmits(['openDetail', 'remove', 'updateData']) |
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
|
::v-deep .u-arrow-down-icon { |
||||
|
margin-right: 0px !important; |
||||
|
} |
||||
</style> |
</style> |
||||
|
@ -1,65 +1,48 @@ |
|||||
<template> |
<template> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<com-item :dataContent="dataContent"></com-item> |
<view class="u-p-t-20 u-p-b-20"> |
||||
<view class='split_line'></view> |
<com-item :dataContent="dataContent"></com-item> |
||||
<scroll-view style="height:320px "> |
</view> |
||||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<scroll-view style="height: 320px" scroll-y> |
||||
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info> |
<detail-item-info :dataContent="dataContent"></detail-item-info> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<view v-if="dataContent.record!=undefined"> |
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info> |
||||
<detail-handle-info :dataContent="dataContent"> |
<view class="split_line"></view> |
||||
</detail-handle-info> |
<view v-if="dataContent.record != undefined"> |
||||
<view class='split_line'></view> |
<detail-handle-info :dataContent="dataContent"> </detail-handle-info> |
||||
</view> |
<view class="split_line"></view> |
||||
<slot> |
</view> |
||||
<!-- 每个任务的详情 --> |
<slot> |
||||
</slot> |
<!-- 每个任务的详情 --> |
||||
</scroll-view> |
</slot> |
||||
|
</scroll-view> |
||||
<view class="uni-flex u-row-center "> |
|
||||
<view class="close_button" @click="closePopup"> |
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
||||
关闭</view> |
<view class="close_button" @click="closePopup"> 关闭</view> |
||||
<!-- button 滚动不好使 --> |
<!-- button 滚动不好使 --> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import comItem from '@/mycomponents/item/item.vue' |
import comItem from '@/mycomponents/item/item.vue' |
||||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
||||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
||||
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' |
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
emits: ['onClose'], |
dataContent: { |
||||
components: { |
type: Object, |
||||
comItem, |
default: {} |
||||
detailItemInfo, |
} |
||||
detailRecommendInfo, |
}) |
||||
detailHandleInfo |
const closePopup = () => { |
||||
}, |
emit('onClose') |
||||
data() { |
} |
||||
return {} |
|
||||
}, |
// 传递给父类 |
||||
|
const emit = defineEmits(['onClose']) |
||||
mounted() {}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
closePopup() { |
|
||||
this.$emit('onClose') |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,79 +1,66 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" mode="bottom"> |
||||
<detail-common-info :dataContent='dataContent'></detail-common-info> |
<detail-common-info :dataContent="dataContent"></detail-common-info> |
||||
</uni-popup> |
</u-popup> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { ref } from 'vue' |
||||
getInventoryStatusName, |
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js' |
||||
getPackUnitInfo |
|
||||
} from '@/common/directory.js'; |
|
||||
|
|
||||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
||||
export default { |
|
||||
components: { |
|
||||
detailCommonInfo |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataContent: {} |
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
title: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
|
|
||||
}, |
const props = defineProps({ |
||||
methods: { |
title: { |
||||
openScanPopup(val) { |
type: String, |
||||
this.dataContent = val; |
default: '' |
||||
setTimeout(res => { |
} |
||||
this.$refs.popup.open('bottom') |
}) |
||||
}, 500) |
const show = ref(false) |
||||
}, |
const dataContent = ref('') |
||||
closeScanPopup() { |
const openScanPopup = (val) => { |
||||
this.$refs.popup.close() |
dataContent.value = val |
||||
}, |
setTimeout((res) => { |
||||
getInventoryStatusInfo(value) { |
show.value = true |
||||
return getInventoryStatusName(value).label |
}, 500) |
||||
}, |
} |
||||
getPackUnit(uom) { |
const closeScanPopup = () => { |
||||
let item = getPackUnitInfo(uom); |
show.value = false |
||||
if (item == '') { |
} |
||||
return uom; |
const getInventoryStatusInfo = (value) => { |
||||
} else { |
return getInventoryStatusName(value).label |
||||
return item.label |
} |
||||
} |
const getPackUnit = (uom) => { |
||||
} |
const item = getPackUnitInfo(uom) |
||||
} |
if (item == '') { |
||||
} |
return uom |
||||
|
} |
||||
|
return item.label |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.popup_box { |
.popup_box { |
||||
width: 500rpx; |
width: 500rpx; |
||||
height: 500rpx; |
height: 500rpx; |
||||
} |
} |
||||
|
|
||||
.item_big_title { |
.item_big_title { |
||||
color: #2196F3; |
color: #2196f3; |
||||
font-size: 35rpx; |
font-size: 35rpx; |
||||
margin-top: 15rpx; |
margin-top: 15rpx; |
||||
margin-bottom: 15rpx; |
margin-bottom: 15rpx; |
||||
} |
} |
||||
|
|
||||
.item { |
.item { |
||||
padding-top: 5rpx; |
padding-top: 5rpx; |
||||
padding-bottom: 5rpx; |
padding-bottom: 5rpx; |
||||
} |
} |
||||
|
|
||||
.item_title { |
.item_title { |
||||
color: #000000; |
color: #000000; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,60 +1,42 @@ |
|||||
<template> |
<template> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<scroll-view style="height:320px "> |
<scroll-view style="height: 320px" scroll-y> |
||||
<scroll-view style="height:320px "> |
<!-- 物品 --> |
||||
<!-- 物品 --> |
<detail-item-info :dataContent="dataContent"></detail-item-info> |
||||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
||||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<!-- 库存余额 --> |
||||
<!-- 库存余额 --> |
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
||||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
<!-- 包装 --> |
||||
<!-- 包装 --> |
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> --> |
||||
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> --> |
</scroll-view> |
||||
</scroll-view> |
|
||||
</scroll-view> |
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
||||
|
<view class="close_button" @click="closePopup"> 关闭</view> |
||||
<view class="uni-flex u-row-center "> |
<!-- button 滚动不好使 --> |
||||
<view class="close_button" @click="closePopup"> |
</view> |
||||
关闭</view> |
</view> |
||||
<!-- button 滚动不好使 --> |
|
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
import { ref } from 'vue' |
||||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
||||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
||||
|
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
||||
export default { |
|
||||
emits: ['onClose'], |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
detailItemInfo, |
type: Object, |
||||
detailPackageInfo, |
default: {} |
||||
detailBalanceInfo |
} |
||||
}, |
}) |
||||
data() { |
const closePopup = () => { |
||||
return {} |
emit('onClose') |
||||
}, |
} |
||||
|
|
||||
mounted() {}, |
// 传递给父类 |
||||
props: { |
const emit = defineEmits(['onClose']) |
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
closePopup() { |
|
||||
this.$emit('onClose') |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,71 +1,52 @@ |
|||||
<template> |
<template> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" mode="bottom"> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<com-item :dataContent="dataContent"></com-item> |
<com-item :dataContent="dataContent"></com-item> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<scroll-view style="height:320px "> |
<scroll-view style="height: 320px" scroll-y> |
||||
<!-- 物品 --> |
<!-- 物品 --> |
||||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
<detail-item-info :dataContent="dataContent"></detail-item-info> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<!-- 库存余额 --> |
<!-- 库存余额 --> |
||||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<!-- 包装 --> |
<!-- 包装 --> |
||||
<detail-package-info :dataContent="dataContent.package"></detail-package-info> |
<detail-package-info :dataContent="dataContent.package"></detail-package-info> |
||||
</scroll-view> |
</scroll-view> |
||||
|
|
||||
<view class="uni-flex u-row-center "> |
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
||||
<view class="close_button" @click="closePopup"> |
<view class="close_button" @click="closePopup"> 关闭</view> |
||||
关闭</view> |
<!-- button 滚动不好使 --> |
||||
<!-- button 滚动不好使 --> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</u-popup> |
||||
</uni-popup> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import comItem from '@/mycomponents/item/item.vue' |
import { ref } from 'vue' |
||||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
import comItem from '@/mycomponents/item/item.vue' |
||||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
||||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
||||
|
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
||||
export default { |
|
||||
emits: ['onClose'], |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
comItem, |
type: Object, |
||||
detailItemInfo, |
default: {} |
||||
detailPackageInfo, |
} |
||||
detailBalanceInfo |
}) |
||||
}, |
const show = ref(false) |
||||
data() { |
const dataContent = ref(props.dataContent) |
||||
return { |
const openPopup = (val) => { |
||||
dataContent: { |
dataContent.value = val |
||||
type: Object, |
setTimeout((res) => { |
||||
default: {} |
show.value = true |
||||
} |
}, 500) |
||||
} |
} |
||||
}, |
const closePopup = () => { |
||||
|
show.value = false |
||||
mounted() {}, |
} |
||||
props: { |
defineExpose({ openPopup, closePopup }) |
||||
|
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
openPopup(val) { |
|
||||
this.dataContent = val; |
|
||||
setTimeout(res => { |
|
||||
this.$refs.popup.open('bottom') |
|
||||
}, 500) |
|
||||
}, |
|
||||
closePopup() { |
|
||||
this.$refs.popup.close() |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,65 +1,47 @@ |
|||||
<template> |
<template> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<com-item :dataContent="dataContent"></com-item> |
<view class="u-p-t-20 u-p-b-20"> |
||||
<view class='split_line'></view> |
<com-item :dataContent="dataContent"></com-item> |
||||
<scroll-view style="height:320px "> |
</view> |
||||
<!-- 物品 --> |
<view class="split_line u-m-b-10"></view> |
||||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
<scroll-view style="height: 320px" scroll-y> |
||||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
<!-- 物品 --> |
||||
<view class='split_line'></view> |
<detail-item-info :dataContent="dataContent"></detail-item-info> |
||||
<!-- 包装 --> |
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
||||
|
<view class="split_line u-m-t-10 u-m-b-10"></view> |
||||
<!-- 库存余额 --> |
<!-- 包装 --> |
||||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|
||||
<slot> |
<!-- 库存余额 --> |
||||
<!-- 每个任务的详情 --> |
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
||||
</slot> |
<slot> |
||||
</scroll-view> |
<!-- 每个任务的详情 --> |
||||
|
</slot> |
||||
<view class="uni-flex u-row-center "> |
</scroll-view> |
||||
<view class="close_button" @click="closePopup"> |
|
||||
关闭</view> |
<view class="u-flex u-row-center u-m-t-20 u-p-b-20"> |
||||
<!-- button 滚动不好使 --> |
<view class="close_button" @click="closePopup">关闭</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import comItem from '@/mycomponents/item/item.vue' |
import comItem from '@/mycomponents/item/item.vue' |
||||
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue' |
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue' |
||||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
||||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
||||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
||||
export default { |
|
||||
emits: ['onClose'], |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
comItem, |
type: Object, |
||||
requestDetailBasicInfo, |
default: {} |
||||
detailRecommendInfo, |
} |
||||
detailItemInfo, |
}) |
||||
detailBalanceInfo |
const closePopup = () => { |
||||
}, |
emit('onClose') |
||||
data() { |
} |
||||
return {} |
// 传递给父类 |
||||
}, |
const emit = defineEmits(['onClose']) |
||||
|
|
||||
mounted() {}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
closePopup() { |
|
||||
this.$emit('onClose') |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,46 +1,26 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<view class="uni-flex u-col-center space-between"> |
<view class="uni-flex u-col-center space-between u-p-t-20"> |
||||
<view > |
<view> |
||||
<view class="card_itemCode" :class="openPopup(dataContent)"> |
<view class="card_itemCode" :class="openPopup(dataContent)"> |
||||
{{dataContent.itemCode}} |
{{ dataContent.itemCode }} |
||||
</view> |
</view> |
||||
<view class="card_itemName"> |
<view class="card_itemName u-m-t-10"> |
||||
{{dataContent.itemName}} |
{{ dataContent.itemName }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
|
type: Object, |
||||
}, |
default: {} |
||||
data() { |
} |
||||
return { |
}) |
||||
|
const openPopup = (val) => {} |
||||
}; |
|
||||
}, |
|
||||
// 此处定义传入的数据 |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
openPopup(val) { |
|
||||
|
|
||||
// console.log(JSON.stringify(val)); |
|
||||
}, |
|
||||
}, |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,67 +1,43 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;"> |
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color: #fff"> |
||||
<view> |
<view style="flex: 1"> |
||||
<item :dataContent="dataContent"></item> |
<item :dataContent="dataContent"></item> |
||||
</view> |
</view> |
||||
<view style="word-break: break-all;width: 30%;display: flex;justify-content:flex-end;margin-right: 10rpx;"> |
<view style="word-break: break-all; display: flex; justify-content: flex-end; margin-right: 10rpx"> |
||||
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" |
<recommend-qty v-if="handleQty == 0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" :objTextStyle="objTextStyle"></recommend-qty> |
||||
:objTextStyle='objTextStyle'></recommend-qty> |
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty> |
||||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" |
</view> |
||||
:handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> |
</view> |
||||
</compare-qty> |
|
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
<script> |
<script setup lang="ts"> |
||||
import item from '@/mycomponents/item/item.vue' |
import { ref, getCurrentInstance, watch } from 'vue' |
||||
import qty from '@/mycomponents/qty/qty.vue' |
import item from '@/mycomponents/item/item.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
|
||||
|
|
||||
export default { |
const { proxy } = getCurrentInstance() |
||||
components: { |
const props = defineProps({ |
||||
item, |
type: { |
||||
recommendQty, |
type: String, |
||||
compareQty, |
default: 'recommend' // recommend:推荐 compare:对比 |
||||
balanceQty |
}, |
||||
}, |
dataContent: { |
||||
data() { |
type: Object, |
||||
return { |
default: {} |
||||
|
}, |
||||
}; |
handleQty: { |
||||
}, |
type: Number, |
||||
// 此处定义传入的数据 |
default: 0 |
||||
props: { |
}, |
||||
type: { |
isShowPackUnit: { |
||||
type: String, |
type: Boolean, |
||||
default: 'recommend' //recommend:推荐 compare:对比 |
default: true |
||||
}, |
}, |
||||
dataContent: { |
objTextStyle: { |
||||
type: Object, |
type: Object, |
||||
default: {} |
default: null |
||||
}, |
} |
||||
handleQty: { |
}) |
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
isShowPackUnit: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
objTextStyle: { |
|
||||
type: Object, |
|
||||
default: null |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,58 +1,43 @@ |
|||||
<!--包装组件--> |
<!--包装组件--> |
||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<view class="uni-flex space-between padding_10" style="background-color: #fff;" > |
<view class="uni-flex space-between padding_10" style="background-color: #fff; padding: 20rpx"> |
||||
<view> |
<view> |
||||
<view class="font_xl text_black text_bold " style="font-size: 38rpx;"> |
<view class="font_xl text_black text_bold" style="font-size: 38rpx"> |
||||
{{ itemdetail.code }} |
{{ itemdetail.code }} |
||||
</view> |
</view> |
||||
<view class="" style="font-size: 32rpx;"> |
<view class="" style="font-size: 32rpx"> |
||||
{{ itemdetail.name }} |
{{ itemdetail.name }} |
||||
</view> |
</view> |
||||
<view class="" style="font-size: 32rpx;"> |
<view class="" style="font-size: 32rpx"> |
||||
{{ itemdetail.desc1 }} |
{{ itemdetail.desc1 }} |
||||
{{ itemdetail.desc2 }} |
{{ itemdetail.desc2 }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class=""> |
<view class=""> |
||||
<item-status :status="itemdetail.status"></item-status> |
<item-status :status="itemdetail.status"></item-status> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup> |
|
||||
</view> |
|
||||
|
|
||||
|
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import itemStatus from '@/mycomponents/item/itemStatus.vue'; |
import { ref } from 'vue' |
||||
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'; |
import itemStatus from '@/mycomponents/item/itemStatus.vue' |
||||
|
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue' |
||||
export default { |
|
||||
name: "comItem", |
|
||||
components: { |
|
||||
itemInfoPopup, |
|
||||
itemStatus |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
}; |
const props = defineProps({ |
||||
}, |
itemdetail: { |
||||
// 此处定义传入的数据 |
type: Object, |
||||
props: { |
value: null |
||||
itemdetail: { |
} |
||||
type: Object, |
}) |
||||
value: null |
const showHint = ref() |
||||
} |
const handleShowHint = () => { |
||||
}, |
showHint.value.openScanPopup() |
||||
methods: { |
} |
||||
showHint() { |
|
||||
this.$refs.showHint.openScanPopup() |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,59 +1,37 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex uni-row space-between center" style="background-color:#fff; margin-left: 15px;"> |
<view class="uni-flex uni-row space-between center" style="width: 100%"> |
||||
<view> |
<view style="flex: 1"> |
||||
<item :dataContent="dataContent"></item> |
<item :dataContent="dataContent"></item> |
||||
</view> |
</view> |
||||
<view> |
<view> |
||||
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty> |
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty> |
||||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" |
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> </compare-qty> |
||||
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> |
</view> |
||||
</compare-qty> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
<script> |
<script setup lang="ts"> |
||||
import item from '@/mycomponents/item/item.vue' |
import item from '@/mycomponents/item/item.vue' |
||||
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
item, |
type: Object, |
||||
balanceQty, |
default: {} |
||||
compareQty |
}, |
||||
}, |
handleQty: { |
||||
data() { |
type: Number, |
||||
return { |
default: 0 |
||||
|
}, |
||||
}; |
isShowBalanceQty: { |
||||
}, |
type: Boolean, |
||||
// 此处定义传入的数据 |
default: true |
||||
props: { |
}, |
||||
dataContent: { |
showStdPack: { |
||||
type: Object, |
type: Boolean, |
||||
default: {} |
default: false |
||||
}, |
} |
||||
handleQty: { |
}) |
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
isShowBalanceQty: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
showStdPack: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,41 +1,24 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<view class="task_card"> |
<view class="task_card"> |
||||
<jobTopAsn :dataContent="dataContent"></jobTopAsn> |
<jobTopAsn :dataContent="dataContent"></jobTopAsn> |
||||
<slot></slot> |
<slot></slot> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<job-bottom :dataContent="dataContent"></job-bottom> |
<job-bottom :dataContent="dataContent"></job-bottom> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
||||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
jobTopAsn, |
type: Object, |
||||
jobBottom, |
default: {} |
||||
}, |
} |
||||
data() { |
}) |
||||
return { |
|
||||
}; |
|
||||
}, |
|
||||
|
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"></style> |
||||
|
|
||||
</style> |
|
||||
|
@ -1,79 +1,61 @@ |
|||||
<template> |
<template> |
||||
<view class="task_item"> |
<view class=""> |
||||
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;"> |
<view class="task_text" style="border-top: 1px solid #dedede; padding-top: 20rpx"> |
||||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" |
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" :objTextStyle="{ fontWeight: 'bold', fontSize: '40rpx' }"></itemCompareQty> |
||||
:objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}"></itemCompareQty> |
<div> |
||||
<div class="u-p-l-10"> |
<pack v-if="isShowPack && dataContent.packingNumber != null" :packingCode="dataContent.packingNumber"> </pack> |
||||
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"> |
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch> |
||||
</pack> |
<div class="u-flex justify-between u-p-b-16"> |
||||
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch> |
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location> |
||||
<div class="u-flex justify-between"> |
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> </to-location> |
||||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> |
</div> |
||||
</location> |
<view class="card_view" v-if="isShowDeliverType"> |
||||
<!-- <to-location></to-location> --> |
<text class="card_packing_code card_content">发货类型</text> |
||||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> |
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text> |
||||
</to-location> |
</view> |
||||
</div> |
</div> |
||||
</div> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
import toLocation from '@/mycomponents/balance/toLocation.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' |
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' |
||||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
pack, |
type: Object, |
||||
location, |
default: {} |
||||
toLocation, |
}, |
||||
batch, |
isShowContainer: { |
||||
jobComMainCard, |
type: Boolean, |
||||
itemCompareQty, |
default: true |
||||
}, |
}, |
||||
data() { |
isShowPack: { |
||||
return {}; |
type: Boolean, |
||||
}, |
default: true |
||||
|
}, |
||||
props: { |
isShowBatch: { |
||||
dataContent: { |
type: Boolean, |
||||
type: Object, |
default: true |
||||
default: {} |
}, |
||||
}, |
isShowFromLocation: { |
||||
isShowContainer: { |
type: Boolean, |
||||
type: Boolean, |
default: true |
||||
default: true |
}, |
||||
}, |
isShowToLocation: { |
||||
isShowPack: { |
type: Boolean, |
||||
type: Boolean, |
default: true |
||||
default: true |
}, |
||||
}, |
isShowDeliverType: { |
||||
isShowBatch: { |
type: Boolean, |
||||
type: Boolean, |
default: false |
||||
default: true |
} |
||||
}, |
}) |
||||
isShowFromLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowToLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"></style> |
||||
|
|
||||
</style> |
|
||||
|
@ -1,62 +1,44 @@ |
|||||
<template> |
<template> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<job-top :dataContent="dataContent"></job-top> |
<job-top :dataContent="dataContent"></job-top> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<scroll-view style="height:400px "> |
<scroll-view style="height: 400px" scroll-y> |
||||
<slot> |
<slot> |
||||
<!-- 每个任务的详情 --> |
<!-- 每个任务的详情 --> |
||||
</slot> |
</slot> |
||||
<job-request-info :dataContent="dataContent"></job-request-info> |
<job-request-info :dataContent="dataContent"></job-request-info> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<job-person-info :dataContent="dataContent"></job-person-info> |
<job-person-info :dataContent="dataContent"></job-person-info> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<job-setting-info :dataContent="dataContent"></job-setting-info> |
<job-setting-info :dataContent="dataContent"></job-setting-info> |
||||
</scroll-view> |
</scroll-view> |
||||
|
|
||||
<view class="uni-flex u-row-center "> |
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
||||
<view class="close_button" @click="closePopup"> |
<view class="close_button" @click="closePopup"> 关闭</view> |
||||
关闭</view> |
<!-- button 滚动不好使 --> |
||||
<!-- button 滚动不好使 --> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import jobTop from '@/mycomponents/job/jobTop.vue' |
import jobTop from '@/mycomponents/job/jobTop.vue' |
||||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
||||
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue' |
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue' |
||||
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue' |
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue' |
||||
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue' |
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue' |
||||
export default { |
|
||||
emits: ['onClose'], |
|
||||
components: { |
|
||||
jobTop, |
|
||||
jobBottom, |
|
||||
jobPersonInfo, |
|
||||
jobSettingInfo, |
|
||||
jobRequestInfo |
|
||||
}, |
|
||||
data() { |
|
||||
return {} |
|
||||
}, |
|
||||
|
|
||||
mounted() {}, |
const props = defineProps({ |
||||
props: { |
dataContent: { |
||||
dataContent: { |
type: Object, |
||||
type: Object, |
default: {} |
||||
default: {} |
} |
||||
} |
}) |
||||
}, |
const closePopup = () => { |
||||
|
emit('onClose') |
||||
|
} |
||||
|
|
||||
methods: { |
// 传递给父类 |
||||
closePopup() { |
const emit = defineEmits(['onClose']) |
||||
this.$emit('onClose') |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,79 +1,70 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<uni-popup ref="popup"> |
<u-popup mode="bottom" v-model="show"> |
||||
<detail-common-info :dataContent='dataContent' @onClose="closeScanPopup()" ></detail-common-info> |
<detail-common-info :dataContent="dataContent" @onClose="closeScanPopup()"></detail-common-info> |
||||
</uni-popup> |
</u-popup> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { ref } from 'vue' |
||||
getInventoryStatusName, |
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js' |
||||
getPackUnitInfo |
|
||||
} from '@/common/directory.js'; |
|
||||
|
|
||||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
||||
export default { |
|
||||
components: { |
|
||||
detailCommonInfo |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataContent: {} |
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
title: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
|
|
||||
}, |
const dataContent = ref({}) |
||||
methods: { |
const show = ref(false) |
||||
openScanPopup(val) { |
const props = defineProps({ |
||||
this.dataContent = val; |
title: { |
||||
setTimeout(res => { |
type: String, |
||||
this.$refs.popup.open('bottom') |
default: '' |
||||
}, 500) |
} |
||||
}, |
}) |
||||
closeScanPopup() { |
const openScanPopup = (val) => { |
||||
this.$refs.popup.close() |
dataContent.value = val |
||||
}, |
setTimeout((res) => { |
||||
getInventoryStatusInfo(value) { |
show.value = true |
||||
return getInventoryStatusName(value).label |
}, 500) |
||||
}, |
} |
||||
getPackUnit(uom) { |
const closeScanPopup = () => { |
||||
let item = getPackUnitInfo(uom); |
show.value = false |
||||
if (item == '') { |
} |
||||
return uom; |
const getInventoryStatusInfo = (value) => { |
||||
} else { |
return getInventoryStatusName(value).label |
||||
return item.name |
} |
||||
} |
const getPackUnit = (uom) => { |
||||
} |
const item = getPackUnitInfo(uom) |
||||
} |
if (item == '') { |
||||
} |
return uom |
||||
|
} |
||||
|
return item.name |
||||
|
} |
||||
|
defineExpose({ |
||||
|
openScanPopup, |
||||
|
closeScanPopup |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.popup_box { |
.popup_box { |
||||
width: 500rpx; |
width: 500rpx; |
||||
height: 500rpx; |
height: 500rpx; |
||||
} |
} |
||||
|
|
||||
.item_big_title { |
.item_big_title { |
||||
color: #2196F3; |
color: #2196f3; |
||||
font-size: 35rpx; |
font-size: 35rpx; |
||||
margin-top: 15rpx; |
margin-top: 15rpx; |
||||
margin-bottom: 15rpx; |
margin-bottom: 15rpx; |
||||
} |
} |
||||
|
|
||||
.item { |
.item { |
||||
padding-top: 5rpx; |
padding-top: 5rpx; |
||||
padding-bottom: 5rpx; |
padding-bottom: 5rpx; |
||||
} |
} |
||||
|
|
||||
.item_title { |
.item_title { |
||||
color: #000000; |
color: #000000; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,155 +1,166 @@ |
|||||
<template> |
<template> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" @click="show = false" mode="right" width="450rpx"> |
||||
<view class="maskbox" @tap="maskClick"></view> |
<view class="maskbox" @tap="maskClick"></view> |
||||
<view class="uni-flex uni-column center" |
<view class="uni-flex uni-column center" style="background-color: white; width: 200px; height: auto; padding: 20rpx; z-index: 100; position: relative; top: 100rpx; right: 20rpx; left: 30rpx; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); border-radius: 10rpx"> |
||||
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;"> |
<view class="uni-flex space-between u-col-center" style="width: 100%"> |
||||
<view class="uni-flex space-between u-col-center" style="width: 100%;"> |
<view class="" style="font-size: 32rpx"> 只看当天 </view> |
||||
<view class="" style="font-size: 32rpx;"> |
|
||||
只看当天 |
|
||||
</view> |
|
||||
|
|
||||
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> |
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> |
||||
</view> |
</view> |
||||
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> |
<view class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
||||
|
<view class="" style="font-size: 32rpx"> 只看待处理 </view> |
||||
<view class="" style="font-size: 32rpx;"> |
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> |
||||
只看待处理 |
</view> |
||||
</view> |
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
||||
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> |
<view class="" style="font-size: 32rpx"> 生产线 </view> |
||||
</view> |
<u-input style="margin-left: 20rpx" v-model="productionLineCode" :border="true" placeholder="请输入生产线" @confirm="productionLineCodeConfirm" /> |
||||
<view class=""> |
</view> |
||||
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn"> |
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
||||
<button class="filter_button" hover-class="filter_button_after" |
<view class="" style="font-size: 32rpx"> 来源库位 </view> |
||||
@click="scanOtherClick">扫描ASN单号</button> |
<u-input style="margin-left: 20rpx" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" /> |
||||
</view> |
</view> |
||||
<view class="uni-flex u-row-center" style="margin-top: 30rpx;"> |
<view class=""> |
||||
<button class="filter_button" hover-class="filter_button_after" |
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn"> |
||||
@click="scanNumberClick">扫描任务编号</button> |
<button class="filter_button" hover-class="filter_button_after" @click="scanOtherClick">扫描ASN单号</button> |
||||
</view> |
</view> |
||||
</view> |
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowJob"> |
||||
</view> |
<button class="filter_button" hover-class="filter_button_after" @click="scanNumberClick">扫描任务编号</button> |
||||
</uni-popup> |
</view> |
||||
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number> |
</view> |
||||
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number> |
</view> |
||||
|
</u-popup> |
||||
|
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode="getScanNumber"></win-scan-job-number> |
||||
|
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode="getScanAsNumber"></win-scan-asn-number> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { ref, getCurrentInstance, watch } from 'vue' |
||||
getTodayDate |
import { getTodayDate } from '@/common/basic.js' |
||||
} from '@/common/basic.js'; |
|
||||
|
|
||||
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue" |
|
||||
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue" |
|
||||
|
|
||||
export default { |
|
||||
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"], |
|
||||
components: { |
|
||||
winScanJobNumber, |
|
||||
winScanAsnNumber |
|
||||
}, |
|
||||
|
|
||||
props: { |
import winScanJobNumber from '@/mycomponents/scan/winScanJobNumber.vue' |
||||
checkedToday: { |
import winScanAsnNumber from '@/mycomponents/scan/winScanAsnNumber.vue' |
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
checkedWaitTask: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
otherTitle: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
isShowAsn:{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataContent: {}, |
|
||||
checkedTodayModel:false, |
|
||||
checkedWaitModel:false, |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
checkedToday: { |
|
||||
handler(newName, oldName) { |
|
||||
this.checkedTodayModel = this.checkedToday |
|
||||
}, |
|
||||
immediate: true, |
|
||||
deep: true |
|
||||
}, |
|
||||
checkedWaitTask: { |
|
||||
handler(newName, oldName) { |
|
||||
this.checkedWaitModel = this.checkedWaitTask |
|
||||
}, |
|
||||
immediate: true, |
|
||||
deep: true |
|
||||
} |
|
||||
}, |
|
||||
mounted() { |
|
||||
}, |
|
||||
methods: { |
|
||||
// 点击遮罩 |
|
||||
maskClick() { |
|
||||
// 如果不允许点击遮罩,直接返回 |
|
||||
this.closeScanPopup(); |
|
||||
}, |
|
||||
openFilter() { |
|
||||
this.$refs['popup'].open("right"); |
|
||||
}, |
|
||||
closeScanPopup() { |
|
||||
this.$refs.popup.close() |
|
||||
}, |
|
||||
switchChangeToday(isOn) { |
|
||||
|
|
||||
let creationTime = ''; |
const props = defineProps({ |
||||
if (isOn) { |
checkedToday: { |
||||
creationTime = getTodayDate(); |
type: Boolean, |
||||
} |
default: false |
||||
|
}, |
||||
|
checkedWaitTask: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
otherTitle: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
isShowAsn: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isShowJob: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowFromLocationCode: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isShowProductionLineCode: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
} |
||||
|
}) |
||||
|
const dataContent = ref({}) |
||||
|
const checkedTodayModel = ref(false) |
||||
|
const checkedWaitModel = ref(false) |
||||
|
const productionLineCode = ref('') // 生产线 |
||||
|
const fromLocationCode = ref('') // 来源库位 |
||||
|
const show = ref(false) |
||||
|
const scanNumber = ref() |
||||
|
const scanAsnNumber = ref() |
||||
|
// 监视属性 |
||||
|
watch( |
||||
|
() => props.checkedToday, |
||||
|
(newVal) => { |
||||
|
checkedTodayModel.value = newVal |
||||
|
console.log(checkedTodayModel.value) |
||||
|
}, |
||||
|
{ immediate: true, deep: true } |
||||
|
) |
||||
|
watch( |
||||
|
() => props.checkedWaitTask, |
||||
|
(newVal) => { |
||||
|
checkedWaitModel.value = newVal |
||||
|
}, |
||||
|
{ immediate: true, deep: true } |
||||
|
) |
||||
|
// 生产线 |
||||
|
|
||||
this.$emit("switchChangeToday", isOn, creationTime) |
const productionLineCodeConfirm = () => { |
||||
this.closeScanPopup() |
emit('productionLineCode', productionLineCode.value) |
||||
}, |
} |
||||
switchChangeWait(isOn) { |
// 来源库位 |
||||
let status = "1,2"; |
|
||||
if(isOn){ |
|
||||
status="1" |
|
||||
} |
|
||||
this.$emit("switchChangeWait", isOn, status) |
|
||||
this.closeScanPopup() |
|
||||
}, |
|
||||
|
|
||||
scanNumberClick() { |
const fromLocationCodeConfirm = () => { |
||||
this.$refs.scanNumber.openScanPopup(); |
emit('fromLocationCode', fromLocationCode.value) |
||||
}, |
} |
||||
|
// 点击遮罩 |
||||
scanOtherClick() { |
const maskClick = () => { |
||||
this.$refs.scanAsnNumber.openScanPopup(); |
// 如果不允许点击遮罩,直接返回 |
||||
}, |
closeScanPopup() |
||||
|
} |
||||
getScanAsNumber(val) { |
const openFilter = () => { |
||||
this.$emit("onScanAsnNumber", val) |
show.value = true |
||||
this.$refs.scanAsnNumber.closeScanPopup(); |
} |
||||
this.closeScanPopup(); |
const closeScanPopup = () => { |
||||
}, |
show.value = false |
||||
getScanNumber(val) { |
} |
||||
this.$emit("onScanNumber", val) |
const switchChangeToday = (isOn) => { |
||||
this.$refs.scanNumber.closeScanPopup(); |
let creationTime = '' |
||||
this.closeScanPopup(); |
if (isOn) { |
||||
}, |
creationTime = getTodayDate() |
||||
} |
} |
||||
} |
emit('switchChangeToday', isOn, creationTime) |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
const switchChangeWait = (isOn) => { |
||||
|
let status = '1,2' |
||||
|
if (isOn) { |
||||
|
status = '1' |
||||
|
} |
||||
|
emit('switchChangeWait', isOn, status) |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
const scanNumberClick = () => { |
||||
|
scanNumber.value.openScanPopup() |
||||
|
} |
||||
|
const scanOtherClick = () => { |
||||
|
scanAsnNumber.value.openScanPopup() |
||||
|
} |
||||
|
const getScanAsNumber = (val) => { |
||||
|
emit('onScanAsnNumber', val) |
||||
|
scanAsnNumber.value.closeScanPopup() |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
const getScanNumber = (val) => { |
||||
|
emit('onScanNumber', val) |
||||
|
scanNumber.value.closeScanPopup() |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode']) |
||||
|
defineExpose({ openFilter }) |
||||
</script> |
</script> |
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.maskbox { |
.maskbox { |
||||
position: fixed; |
position: fixed; |
||||
top: 0; |
top: 0; |
||||
left: 0; |
left: 0; |
||||
width: 100vw; |
width: 100vw; |
||||
height: 100vh; |
height: 100vh; |
||||
z-index: 0; |
z-index: 0; |
||||
} |
} |
||||
|
|
||||
|
::v-deep .u-drawer-right { |
||||
|
background-color: rgba(0, 0, 0, 0) !important; |
||||
|
} |
||||
</style> |
</style> |
||||
|
@ -1,42 +1,28 @@ |
|||||
<template> |
<template> |
||||
<view class="task_top"> |
<view class="task_item"> |
||||
<view class="uni-flex space-between u-col-center align-center" > |
<view class="uni-flex space-between u-col-center align-center"> |
||||
<job-number v-if="dataContent.asnNumber==null || dataContent.asnNumber==''" :number="dataContent.requestNumber"></job-number> |
<job-number v-if="dataContent.asnNumber == null || dataContent.asnNumber == ''" :number="dataContent.requestNumber"></job-number> |
||||
<job-number v-else :number="dataContent.asnNumber"></job-number> |
<job-number v-else :number="dataContent.asnNumber"></job-number> |
||||
<job-status :jobStatus="dataContent.status"></job-status> |
<job-status :jobStatus="dataContent.status"></job-status> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import jobNumber from '@/mycomponents/job/jobNumber.vue' |
import jobNumber from '@/mycomponents/job/jobNumber.vue' |
||||
import jobStatus from '@/mycomponents/job/jobStatus.vue' |
import jobStatus from '@/mycomponents/job/jobStatus.vue' |
||||
export default { |
|
||||
components: { |
|
||||
jobNumber, |
|
||||
jobStatus |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
}; |
const props = defineProps({ |
||||
}, |
dataContent: { |
||||
watch: {}, |
type: Object, |
||||
|
default: {} |
||||
props: { |
} |
||||
dataContent: { |
}) |
||||
type: Object, |
const openDetail = (item) => { |
||||
default: {} |
emit('openDetail', props.dataContent) |
||||
}, |
} |
||||
}, |
// 传递给父类 |
||||
|
const emit = defineEmits(['openDetail']) |
||||
methods: { |
|
||||
openDetail(item) { |
|
||||
this.$emit("openDetail", this.dataContent); |
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"></style> |
||||
</style> |
|
||||
|
@ -0,0 +1,65 @@ |
|||||
|
<template> |
||||
|
<view class="wyf"> |
||||
|
<u-popup v-model="show" mode="center" width="600rpx"> |
||||
|
<view class="container"> |
||||
|
<u-card :title="item.title" v-for="(item, index) in list" :key="item.id" margin="20rpx" :head-style="{ padding: '20rpx' }" :foot-style="{ padding: '0rpx' }"> |
||||
|
<template v-slot:body> |
||||
|
<view class=""> 物料代码:{{ item.itemCode }} </view> |
||||
|
<view class=""> 物料名称:{{ item.itemName }} </view> |
||||
|
</template> |
||||
|
<template v-slot:foot> |
||||
|
<!-- <button class="go" >Go</button> --> |
||||
|
|
||||
|
<u-button type="primary" @click="selectItem(item, index)" style="width: 200rpx; height: 60rpx">Go</u-button> |
||||
|
</template> |
||||
|
</u-card> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue' |
||||
|
|
||||
|
const list = ref([]) |
||||
|
const show = ref(false) |
||||
|
const openList = (listParmas) => { |
||||
|
list.value = listParmas |
||||
|
show.value = true |
||||
|
} |
||||
|
const selectItem = (item, index) => { |
||||
|
emit('selectItem', item) |
||||
|
} |
||||
|
|
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['selectItem']) |
||||
|
defineExpose({ |
||||
|
openList |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.container { |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
|
||||
|
.list { |
||||
|
width: 80%; |
||||
|
max-height: 80vh; |
||||
|
overflow-y: auto; |
||||
|
border-radius: 10px !important; |
||||
|
|
||||
|
.slot-image { |
||||
|
width: 40rpx; |
||||
|
} |
||||
|
|
||||
|
.go { |
||||
|
color: rgb(60, 156, 255); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.list ::v-deep .uni-list--border { |
||||
|
border: 1rpx solid #e5e5e5; |
||||
|
} |
||||
|
</style> |
@ -1,55 +1,42 @@ |
|||||
<template> |
<template> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<view class="uni-flex uni-row space-between u-col-center" > |
<view class="uni-flex uni-row space-between u-col-center"> |
||||
<view class="location_view" > |
<view class="location_view"> |
||||
<text class="card_location"> 库位 </text> |
<text class="card_location"> 库位 </text> |
||||
<text> {{locationCode}}</text> |
<text> {{ locationCode }}</text> |
||||
</view> |
</view> |
||||
<view class="" v-if="recommendQty>0"> |
<view class="" v-if="recommendQty > 0"> |
||||
<count :countType="'recommend_handle_no_pack'" |
<count :countType="'recommend_handle_no_pack'" :recommendQty="recommendQty" :handledQty="handledQty" :uom="uom"></count> |
||||
:recommendQty="recommendQty" |
</view> |
||||
:handledQty="handledQty" |
</view> |
||||
:uom="uom"></count> |
</view> |
||||
</view> |
|
||||
|
|
||||
</view> |
|
||||
|
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
import { ref } from 'vue' |
||||
components: { |
|
||||
}, |
|
||||
data(){ |
|
||||
return { |
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
locationInfo:{ |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
locationCode:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
recommendQty:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
handledQty:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
uom:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
} |
const props = defineProps({ |
||||
|
locationInfo: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
locationCode: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
recommendQty: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
}, |
||||
|
handledQty: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
}, |
||||
|
uom: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,126 +1,90 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
||||
padding-bottom: 15rpx; |
<view class="uni-flex u-row u-col-center" @click="showLocation"> |
||||
padding-left: 10rpx; |
<view class="flex u-row" v-if="isShowEdit"> |
||||
padding-right: 10rpx; |
<view> |
||||
font-size:32rpx;"> |
<text style="font-size: 30rpx">{{ title }}</text> |
||||
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
|
||||
<view class="flex uni-row" v-if="isShowEdit" > |
|
||||
<view > |
|
||||
<text style="font-size: 30rpx;">{{title}}</text> |
|
||||
|
|
||||
<text style="font-size: 25rpx;color:#3FBAFF;">  {{recommendLocationCode}}</text> |
<text style="font-size: 25rpx; color: #3fbaff">  {{ recommendLocationCode }}</text> |
||||
<text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;"> / {{locationCode}}</text> |
<text v-if="locationCode" style="font-size: 25rpx; color: #3fbaff"> / {{ locationCode }}</text> |
||||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
||||
</view> |
</view> |
||||
<image style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
<image style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image> |
||||
</view> |
</view> |
||||
<view class="" v-else> |
<view class="" v-else> |
||||
<view > |
<view> |
||||
<text style="font-size: 30rpx;">{{title}}</text> |
<text style="font-size: 30rpx">{{ title }}</text> |
||||
<text style="font-size: 25rpx;color:#3FBAFF;">  {{recommendLocationCode}}</text> |
<text style="font-size: 25rpx; color: #3fbaff">  {{ recommendLocationCode }}</text> |
||||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
|
<view class="uni-flex uni-row center" style="vertical-align: center" v-if="isDevlement()"> |
||||
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> |
<!-- <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> --> |
||||
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> |
<image style="width: 26rpx; height: 26rpx; margin-top: 6rpx" src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" /> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' |
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
||||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
import { ref, getCurrentInstance } from 'vue' |
||||
import config from '@/static/config.js' |
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
||||
|
import config from '@/static/config.js' |
||||
|
|
||||
export default { |
const defaultlocationCode = ref('') |
||||
components: { |
const props = defineProps({ |
||||
winScanLocation |
title: { |
||||
}, |
type: String, |
||||
data() { |
default: '需求库位' |
||||
return { |
}, |
||||
defaultlocationCode: "" |
recommendLocationCode: { |
||||
} |
type: String, |
||||
}, |
default: '' |
||||
props: { |
}, |
||||
title: { |
locationCode: { |
||||
type: String, |
type: String, |
||||
default: "需求库位" |
default: '' |
||||
}, |
}, |
||||
recommendLocationCode: { |
isShowEdit: { |
||||
type: String, |
type: Boolean, |
||||
default: "" |
default: true |
||||
}, |
}, |
||||
locationCode: { |
locationAreaTypeList: { |
||||
type: String, |
type: Array, |
||||
default: "" |
default: null |
||||
}, |
} |
||||
isShowEdit: { |
}) |
||||
type: Boolean, |
const scanLocationCode = ref() |
||||
default: true |
const showLocation = () => { |
||||
}, |
if (props.isShowEdit) { |
||||
locationAreaTypeList: { |
scanLocationCode.value.openScanPopup() |
||||
type: Array, |
} |
||||
default: null |
} |
||||
} |
// 扫描源库位 |
||||
}, |
const getLocation = (location, code) => { |
||||
|
emit('getLocation', location, code) |
||||
|
} |
||||
|
const copy = () => { |
||||
|
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
|
const content = props.recommendLocationCode |
||||
|
|
||||
watch: { |
uni.setClipboardData({ |
||||
// locationCode: { |
data: content, |
||||
// handler(newName, oldName) { |
success: () => { |
||||
// if (this.locationCode != "") { |
uni.showToast({ |
||||
// this.defaultlocationCode = this.locationCode; |
title: '复制库位成功' |
||||
// } |
}) |
||||
// }, |
} |
||||
// immediate: true, |
}) |
||||
// deep: true |
} |
||||
// } |
const isDevlement = () => { |
||||
}, |
return config.isDevelopment |
||||
methods: { |
} |
||||
showLocation() { |
|
||||
if (this.isShowEdit) { |
|
||||
this.$refs.scanLocationCode.openScanPopup(); |
|
||||
} |
|
||||
|
|
||||
}, |
// 传递给父类 |
||||
//扫描源库位 |
const emit = defineEmits(['getLocation']) |
||||
getLocation(location, code) { |
|
||||
this.$emit("getLocation", location, code) |
|
||||
}, |
|
||||
copy() { |
|
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|
||||
var content = this.recommendLocationCode; |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制库位成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制库位成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
isDevlement() { |
|
||||
return config.isDevelopment; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,47 +1,35 @@ |
|||||
<template> |
<template> |
||||
<view class="cen_card" style="background-color: #fff;"> |
<view class="cen_card" style="background-color: #eef4fa"> |
||||
<view class="cell_box uni-flex uni-row"> |
<view class="cell_box uni-flex uni-row"> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">仓库</view> |
<view class="text_lightblue">仓库</view> |
||||
<view>{{dataContent.warehouseCode}}</view> |
<view>{{ dataContent.warehouseCode }}</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">库区</view> |
<view class="text_lightblue">库区</view> |
||||
<view>{{dataContent.areaCode }}</view> |
<view>{{ dataContent.areaCode }}</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">库位组</view> |
<view class="text_lightblue">库位组</view> |
||||
<view>{{ dataContent.locationGroupCode }}</view> |
<view>{{ dataContent.locationGroupCode }}</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">ERP储位</view> |
<view class="text_lightblue">ERP储位</view> |
||||
<view>{{ dataContent.erpLocationCode }}</view> |
<view>{{ dataContent.erpLocationCode }}</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
||||
name: 'comItemLocationCenter', |
|
||||
components: {}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
data() { |
|
||||
return {} |
|
||||
}, |
|
||||
created() { |
|
||||
|
|
||||
}, |
const props = defineProps({ |
||||
methods: { |
dataContent: { |
||||
|
type: Object, |
||||
} |
default: {} |
||||
} |
} |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,45 +1,32 @@ |
|||||
<!--库位组件--> |
<!--库位组件--> |
||||
<template> |
<template> |
||||
<view class="" > |
<view class=""> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<view class="uni-flex space-between" style="padding: 20rpx;"> |
<view class="uni-flex space-between" style="padding: 20rpx"> |
||||
<view class="" > |
<view class=""> |
||||
<text class="font_xl text_black text_bold">{{locationDetail.code}}</text> |
<text class="font_xl text_black text_bold">{{ locationDetail.code }}</text> |
||||
</view> |
</view> |
||||
<view class=""> |
<view class=""> |
||||
<location-status :type="locationDetail.type" ></location-status> |
<location-status :type="locationDetail.type"></location-status> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<location-detail :dataContent="locationDetail"></location-detail> |
<view class="" style="padding: 0px 20rpx"> |
||||
</view> |
<location-detail-com :dataContent="locationDetail"></location-detail-com> |
||||
</view> |
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import locationDetail from '@/mycomponents/location/locationDetail.vue' |
import locationDetailCom from '@/mycomponents/location/locationDetail.vue' |
||||
import locationStatus from '@/mycomponents/location/locationStatus.vue' |
import locationStatus from '@/mycomponents/location/locationStatus.vue' |
||||
export default { |
|
||||
name: "comlocation", |
|
||||
components: { |
|
||||
locationDetail, |
|
||||
locationStatus, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
}; |
const props = defineProps({ |
||||
}, |
locationDetail: { |
||||
// 此处定义传入的数据 |
type: Object, |
||||
props: { |
value: null |
||||
locationDetail: { |
} |
||||
type: Object, |
}) |
||||
value: null |
|
||||
} |
|
||||
}, |
|
||||
methods:{ |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"></style> |
||||
</style> |
|
||||
|
@ -1,46 +1,30 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<text :class="statusStyle(type)" style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(type)}}</text> |
<text :class="statusStyle(type)" style="padding-top: 5rpx; padding-bottom: 5rpx; padding-left: 15rpx; padding-right: 15rpx">{{ statusDesc(type) }}</text> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { getLocationTypeInfo } from '@/common/directory.js' |
||||
getLocationTypeInfo |
|
||||
} from '@/common/directory.js'; |
const props = defineProps({ |
||||
export default { |
dataContent: { |
||||
components: { |
type: Object, |
||||
|
default: {} |
||||
}, |
}, |
||||
data() { |
type: { |
||||
return { |
type: String, |
||||
|
default: '' |
||||
|
} |
||||
}; |
}) |
||||
}, |
|
||||
props: { |
const statusDesc = (code) => { |
||||
dataContent: { |
return getLocationTypeInfo(code).label |
||||
type: Object, |
} |
||||
default: {}, |
|
||||
}, |
const statusStyle = (code) => { |
||||
type: { |
return getLocationTypeInfo(code).remark |
||||
type: String, |
} |
||||
default: "", |
|
||||
}, |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
statusDesc(code) { |
|
||||
return getLocationTypeInfo(code).label |
|
||||
}, |
|
||||
statusStyle(code) { |
|
||||
|
|
||||
return getLocationTypeInfo(code).remark; |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,79 +1,53 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
||||
padding-bottom: 15rpx; |
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
||||
padding-left: 10rpx; |
<view style="font-size: 30rpx"> |
||||
padding-right: 10rpx; |
{{ title }} |
||||
font-size:32rpx;"> |
<!-- <text style="font-size: 35rpx;">{{title}}  {{locationCode}} </text> --> |
||||
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
<text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">  请扫描</text> |
||||
<view> |
<text style="font-size: 25rpx; color: #3fbaff">  {{ locationCode }}</text> |
||||
{{title}} |
</view> |
||||
<!-- <text style="font-size: 35rpx;">{{title}}  {{locationCode}} </text> --> |
<image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image> |
||||
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> |
</view> |
||||
<text style="font-size: 35rpx;color:#3FBAFF;">  {{locationCode}}</text> |
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
||||
</view> |
</view> |
||||
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|
||||
</view> |
|
||||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' |
|
||||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
import { ref } from 'vue' |
||||
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
title: { |
||||
winScanLocation |
type: String, |
||||
}, |
default: '需求库位' |
||||
data() { |
}, |
||||
return { |
locationCode: { |
||||
defaultlocationCode: "" |
type: String, |
||||
} |
default: '' |
||||
}, |
}, |
||||
props: { |
isShowEdit: { |
||||
title: { |
type: Boolean, |
||||
type: String, |
default: true |
||||
default: "需求库位" |
}, |
||||
}, |
locationAreaTypeList: { |
||||
locationCode: { |
type: Array, |
||||
type: String, |
default: null |
||||
default: "" |
} |
||||
}, |
}) |
||||
isShowEdit: { |
const scanLocationCode = ref() |
||||
type: Boolean, |
const showLocation = () => { |
||||
default: true |
if (props.isShowEdit) { |
||||
}, |
scanLocationCode.value.openScanPopup() |
||||
locationAreaTypeList: { |
} |
||||
type: Array, |
} |
||||
default: null |
// 扫描源库位 |
||||
} |
const getLocation = (location, code) => { |
||||
}, |
emit('getLocation', location, code) |
||||
|
} |
||||
|
|
||||
watch: { |
// 传递给父类 |
||||
// locationCode: { |
const emit = defineEmits(['getLocation']) |
||||
// handler(newName, oldName) { |
|
||||
// if (this.locationCode != "") { |
|
||||
// this.defaultlocationCode = this.locationCode; |
|
||||
// } |
|
||||
// }, |
|
||||
// immediate: true, |
|
||||
// deep: true |
|
||||
// } |
|
||||
}, |
|
||||
methods: { |
|
||||
showLocation() { |
|
||||
if (this.isShowEdit) { |
|
||||
this.$refs.scanLocationCode.openScanPopup(); |
|
||||
} |
|
||||
|
|
||||
}, |
|
||||
//扫描源库位 |
|
||||
getLocation(location, code) { |
|
||||
this.$emit("getLocation", location, code) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,204 +1,227 @@ |
|||||
<template> |
<template> |
||||
<uni-popup ref="popup"> |
<u-popup mode="bottom" v-model="show"> |
||||
<view class="pop_detail" style="height:80%"> |
<view class="pop_detail" style="height: 80%"> |
||||
<com-item :dataContent="dataContent"></com-item> |
<com-item :dataContent="dataContent"></com-item> |
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<scroll-view style="height:320px "> |
<scroll-view style="height: 320px" scroll-y> |
||||
<view v-for="(item, index) in dataList" style="width: 100%;"> |
<view v-for="(item, index) in dataList" style="width: 100%"> |
||||
<view class="item"> |
<view class="item"> |
||||
<text class="item_title">{{item.item_title}} </text> |
<text class="item_title">{{ item.item_title }} </text> |
||||
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text> |
<text v-if="item.type == '' || item.type == undefined" class="text_wrap">{{ item.content }}</text> |
||||
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text> |
<text v-else-if="item.type == 'dateTime'" class="text_wrap">{{ formatDate(item.content) }} </text> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</scroll-view> |
</scroll-view> |
||||
|
|
||||
<view class="uni-flex u-row-center "> |
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
||||
<view class="close_button" @click="closePopup"> |
<view class="close_button" @click="closePopup"> 关闭</view> |
||||
关闭</view> |
<!-- button 滚动不好使 --> |
||||
<!-- button 滚动不好使 --> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</u-popup> |
||||
</uni-popup> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import comItem from '@/mycomponents/item/item.vue' |
import { ref } from 'vue' |
||||
import { dateFormat } from '@/common/basic.js'; |
import comItem from '@/mycomponents/item/item.vue' |
||||
export default { |
import { dateFormat } from '@/common/basic.js' |
||||
emits: ['onClose'], |
|
||||
components: { |
|
||||
comItem |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
dataList: [] |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mounted() {}, |
const dataContent = ref({}) |
||||
props: { |
const dataList = ref([]) |
||||
|
const show = ref(false) |
||||
}, |
const openPopup = (val) => { |
||||
|
dataContent.value = val |
||||
methods: { |
getDataList() |
||||
openPopup(val) { |
setTimeout((res) => { |
||||
this.dataContent = val; |
show.value = true |
||||
this.getDataList(); |
}, 500) |
||||
setTimeout(res => { |
} |
||||
this.$refs.popup.open('bottom') |
const closePopup = () => { |
||||
}, 500) |
show.value = false |
||||
|
} |
||||
}, |
const getDataList = () => { |
||||
closePopup(val) { |
// console.log(JSON.stringify( dataContent)); |
||||
this.$refs.popup.close('bottom') |
dataList.value.length = 0 |
||||
// this.$emit('onClose') |
dataList.value.push( |
||||
}, |
...[ |
||||
getDataList() { |
{ |
||||
// console.log(JSON.stringify(this.dataContent)); |
item_title: '包装号', |
||||
this.dataList.length = 0; |
content: dataContent.value.number |
||||
this.dataList.push(...[{ |
}, |
||||
item_title: '包装号', |
{ |
||||
content: this.dataContent.number |
item_title: '物料代码', |
||||
}, { |
content: dataContent.value.itemCode |
||||
item_title: '物料代码', |
}, |
||||
content: this.dataContent.itemCode |
{ |
||||
}, { |
item_title: '物品名称', |
||||
item_title: '物品名称', |
content: dataContent.value.itemName |
||||
content: this.dataContent.itemName |
}, |
||||
}, { |
{ |
||||
item_title: '物品描述1', |
item_title: '物品描述1', |
||||
content: this.dataContent.itemDesc1 |
content: dataContent.value.itemDesc1 |
||||
}, { |
}, |
||||
item_title: '物品描述2', |
{ |
||||
content: this.dataContent.itemDesc2 |
item_title: '物品描述2', |
||||
}, { |
content: dataContent.value.itemDesc2 |
||||
item_title: '批次', |
}, |
||||
content: this.dataContent.batch |
{ |
||||
}, { |
item_title: '批次', |
||||
item_title: '替代批次', |
content: dataContent.value.batch |
||||
content: this.dataContent.altBatch |
}, |
||||
}, { |
{ |
||||
item_title: '生产日期', |
item_title: '替代批次', |
||||
content: this.dataContent.produceDate, |
content: dataContent.value.altBatch |
||||
type:"dateTime" |
}, |
||||
}, { |
{ |
||||
item_title: '有效日期', |
item_title: '生产日期', |
||||
content: this.dataContent.validityDays, |
content: dataContent.value.produceDate, |
||||
type:"dateTime" |
type: 'dateTime' |
||||
}, { |
}, |
||||
item_title: '失效日期', |
{ |
||||
content: this.dataContent.expireDate, |
item_title: '有效日期', |
||||
type:"dateTime" |
content: dataContent.value.validityDays, |
||||
}, { |
type: 'dateTime' |
||||
item_title: '计量单位', |
}, |
||||
content: this.dataContent.uom, |
{ |
||||
type:"uom" |
item_title: '失效日期', |
||||
}, { |
content: dataContent.value.expireDate, |
||||
item_title: '数量', |
type: 'dateTime' |
||||
content: this.dataContent.qty |
}, |
||||
}, { |
{ |
||||
item_title: '替代计量单位', |
item_title: '计量单位', |
||||
content: this.dataContent.altUom |
content: dataContent.value.uom, |
||||
}, { |
type: 'uom' |
||||
item_title: '替代数量', |
}, |
||||
content: this.dataContent.altQty |
{ |
||||
}, { |
item_title: '数量', |
||||
item_title: '转换率', |
content: dataContent.value.qty |
||||
content: this.dataContent.convertRate |
}, |
||||
}, { |
{ |
||||
item_title: '标包数量', |
item_title: '替代计量单位', |
||||
content: this.dataContent.packQty |
content: dataContent.value.altUom |
||||
}, { |
}, |
||||
item_title: '标包单位', |
{ |
||||
content: this.dataContent.packUnit |
item_title: '替代数量', |
||||
}, { |
content: dataContent.value.altQty |
||||
item_title: '仓库代码', |
}, |
||||
content: this.dataContent.toWarehouseCode |
{ |
||||
}, { |
item_title: '转换率', |
||||
item_title: '月台代码', |
content: dataContent.value.convertRate |
||||
content: this.dataContent.toDockCode |
}, |
||||
}, { |
{ |
||||
item_title: '库位代码', |
item_title: '标包数量', |
||||
content: this.dataContent.toLocationCode |
content: dataContent.value.packQty |
||||
}, { |
}, |
||||
item_title: '供应商代码', |
{ |
||||
content: this.dataContent.supplierCode |
item_title: '标包单位', |
||||
}, { |
content: dataContent.value.packUnit |
||||
item_title: '供应商物品代码', |
}, |
||||
content: this.dataContent.supplierItemCode |
{ |
||||
}, { |
item_title: '仓库代码', |
||||
item_title: '采购订单号', |
content: dataContent.value.toWarehouseCode |
||||
content: this.dataContent.poNumber |
}, |
||||
}, { |
{ |
||||
item_title: '采购订单行', |
item_title: '月台代码', |
||||
content: this.dataContent.poLine |
content: dataContent.value.toDockCode |
||||
}, { |
}, |
||||
item_title: '采购计划单号', |
{ |
||||
content: this.dataContent.rpNumber |
item_title: '库位代码', |
||||
}, { |
content: dataContent.value.toLocationCode |
||||
item_title: '发货单号', |
}, |
||||
content: this.dataContent.asnNumber |
{ |
||||
}, { |
item_title: '供应商代码', |
||||
item_title: '生产订单号', |
content: dataContent.value.supplierCode |
||||
content: this.dataContent.woNumber |
}, |
||||
}, { |
{ |
||||
item_title: '生产订单行', |
item_title: '供应商物品代码', |
||||
content: this.dataContent.woLine |
content: dataContent.value.supplierItemCode |
||||
}, { |
}, |
||||
item_title: '生产线代码', |
{ |
||||
content: this.dataContent.productionLineCode |
item_title: '采购订单号', |
||||
}, { |
content: dataContent.value.poNumber |
||||
item_title: '班组代码', |
}, |
||||
content: this.dataContent.teamCode |
{ |
||||
}, { |
item_title: '采购订单行', |
||||
item_title: '班次代码', |
content: dataContent.value.poLine |
||||
content: this.dataContent.shiftCode |
}, |
||||
}, { |
{ |
||||
item_title: '客户代码', |
item_title: '采购计划单号', |
||||
content: this.dataContent.customerCode |
content: dataContent.value.rpNumber |
||||
}, { |
}, |
||||
item_title: '客户月台代码', |
{ |
||||
content: this.dataContent.customerDockCode |
item_title: '发货单号', |
||||
}, { |
content: dataContent.value.asnNumber |
||||
item_title: '客户物品代码', |
}, |
||||
content: this.dataContent.customerItemCode |
{ |
||||
}, { |
item_title: '生产订单号', |
||||
item_title: '销售订单号', |
content: dataContent.value.woNumber |
||||
content: this.dataContent.soNumber |
}, |
||||
}, { |
{ |
||||
item_title: '销售订单行', |
item_title: '生产订单行', |
||||
content: this.dataContent.soLine |
content: dataContent.value.woLine |
||||
}, { |
}, |
||||
item_title: '质量等级', |
{ |
||||
content: this.dataContent.eqLevel |
item_title: '生产线代码', |
||||
}, { |
content: dataContent.value.productionLineCode |
||||
item_title: '货主代码', |
}, |
||||
content: this.dataContent.ownerCode |
{ |
||||
}, { |
item_title: '班组代码', |
||||
item_title: '重量', |
content: dataContent.value.teamCode |
||||
content: this.dataContent.weight |
}, |
||||
}, { |
{ |
||||
item_title: '面积', |
item_title: '班次代码', |
||||
content: this.dataContent.area |
content: dataContent.value.shiftCode |
||||
}, { |
}, |
||||
item_title: '体积', |
{ |
||||
content: this.dataContent.volume |
item_title: '客户代码', |
||||
}]); |
content: dataContent.value.customerCode |
||||
}, |
}, |
||||
formatDate(val) { |
{ |
||||
return dateFormat(val) |
item_title: '客户月台代码', |
||||
}, |
content: dataContent.value.customerDockCode |
||||
|
}, |
||||
} |
{ |
||||
} |
item_title: '客户物品代码', |
||||
|
content: dataContent.value.customerItemCode |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '销售订单号', |
||||
|
content: dataContent.value.soNumber |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '销售订单行', |
||||
|
content: dataContent.value.soLine |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '质量等级', |
||||
|
content: dataContent.value.eqLevel |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '货主代码', |
||||
|
content: dataContent.value.ownerCode |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '重量', |
||||
|
content: dataContent.value.weight |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '面积', |
||||
|
content: dataContent.value.area |
||||
|
}, |
||||
|
{ |
||||
|
item_title: '体积', |
||||
|
content: dataContent.value.volume |
||||
|
} |
||||
|
] |
||||
|
) |
||||
|
} |
||||
|
const formatDate = (val) => { |
||||
|
return dateFormat(val) |
||||
|
} |
||||
|
defineExpose({ |
||||
|
openPopup, |
||||
|
closePopup |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
|
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,57 +1,41 @@ |
|||||
<template> |
<template> |
||||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx; background-color: #fff"> |
||||
padding-bottom: 15rpx; |
<text style="font-size: 30rpx">{{ title }} </text> |
||||
padding-left: 10rpx; |
<view class="uni-flex u-col-center" @click="showPack"> |
||||
padding-right: 10rpx; |
<text style="color: #3fbaff; font-size: 25rpx" v-if="packingNumber == '' && isShowEdit == true">  请扫描</text> |
||||
font-size:32rpx;background-color: #fff;"> |
<text style="color: #3fbaff; font-size: 25rpx">  {{ packingNumber }}</text> |
||||
<text style="font-size: 35rpx;">{{title}} </text> |
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image> |
||||
<view class="uni-flex u-col-center" @click="showPack"> |
</view> |
||||
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="packingNumber==''&&isShowEdit==true">  请扫描</text> |
<win-scan-pack ref="scanPopup" @getResult="getScanResult" headerType="HPQ"></win-scan-pack> |
||||
<text style="color:#3FBAFF; font-size: 35rpx;">  {{packingNumber}}</text> |
</view> |
||||
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg" |
|
||||
></image> |
|
||||
</view> |
|
||||
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
export default { |
|
||||
components: { |
|
||||
winScanPack |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
title: { |
|
||||
type: String, |
|
||||
default: "需求库位" |
|
||||
}, |
|
||||
packingNumber: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
isShowEdit: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
watch: { |
const props = defineProps({ |
||||
}, |
title: { |
||||
methods: { |
type: String, |
||||
showPack() { |
default: '需求库位' |
||||
this.$refs.scanPopup.openScanPopup(); |
}, |
||||
}, |
packingNumber: { |
||||
getScanResult(result) { |
type: String, |
||||
this.$emit("getScanResult", result) |
default: '' |
||||
} |
}, |
||||
} |
isShowEdit: { |
||||
} |
type: Boolean, |
||||
|
default: true |
||||
|
} |
||||
|
}) |
||||
|
const showPack = () => { |
||||
|
scanPopup.value.openScanPopup() |
||||
|
} |
||||
|
const getScanResult = (result) => { |
||||
|
emit('getScanResult', result) |
||||
|
} |
||||
|
|
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['result']) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,116 +1,96 @@ |
|||||
<template> |
<template> |
||||
<uni-popup ref="popupItems"> |
<u-popup v-model="isShow" mode="center"> |
||||
<com-popup @onClose="closePopup"> |
<com-popup @onClose="closePopup"> |
||||
<view class="uni-center" style="position: relative;height:900rpx ;"> |
<view class="uni-center" style="position: relative; height: 900rpx; width: 600rpx"> |
||||
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;"> |
<view class="" style="position: absolute; font-size: 38rpx; height: 50rpx; margin-top: 10rpx; margin-bottom: 10rpx; left: 0; top: 0; right: 0"> 选择物料 </view> |
||||
选择物料 |
<u-line /> |
||||
</view> |
<view class="" style="position: absolute; height: 720rpx; font-size: 40rpx; top: 70rpx; bottom: 80rpx; left: 0; right: 0"> |
||||
<u-line/> |
<view style="margin: 15rpx; text-align: left" v-for="(item, index) in showList" :key="index"> |
||||
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;"> |
<view class="" style="padding: 10rpx; font-size: 30rpx" @click="selectItem(item)"> ({{ index + 1 }}) 物料: {{ item.itemCode }} </view> |
||||
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" > |
<u-line /> |
||||
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)"> |
</view> |
||||
({{index+1}}) 物料: {{item.itemCode}} |
</view> |
||||
</view> |
<view class="" style="position: absolute; height: 80rpx; left: 0; bottom: 0; right: 0"> |
||||
<u-line/> |
<view class="flex uni-center" style="width: 100%; justify-content: center; margin-top: 10rpx; margin-bottom: 10rpx"> |
||||
</view> |
<view class=""> 当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }} </view> |
||||
</view> |
</view> |
||||
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;"> |
<view class=""> |
||||
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" > |
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /> |
||||
<view class=""> |
</view> |
||||
当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }} |
</view> |
||||
</view> |
</view> |
||||
|
</com-popup> |
||||
</view> |
</u-popup> |
||||
<view class=""> |
|
||||
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
</com-popup> |
|
||||
</uni-popup> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
|
import { ref, getCurrentInstance, nextTick } from 'vue' |
||||
import { |
import { getCustomerItemList } from '@/api/request2.js' |
||||
getCustomerItemList |
import comPopup from '@/mycomponents/common/comPopup.vue' |
||||
} from '@/api/request2.js'; |
|
||||
import comPopup from '@/mycomponents/common/comPopup.vue' |
|
||||
export default { |
|
||||
emits: ["selectedItem"], |
|
||||
components: { |
|
||||
comPopup, |
|
||||
}, |
|
||||
props: { |
|
||||
|
|
||||
}, |
const showList = ref([]) |
||||
data() { |
const pageCurrent = ref(1) |
||||
return { |
const pageSize = ref(10) |
||||
showList: [], |
const total = ref(0) |
||||
pageCurrent:1, |
const isShow = ref(false) |
||||
pageSize:10, |
const queryList = (lineCode) => { |
||||
total:0 |
const filters = [] |
||||
|
filters.push({ |
||||
|
column: 'customerCode', |
||||
|
action: '==', |
||||
|
value: lineCode |
||||
|
}) |
||||
|
|
||||
} |
const params = { |
||||
}, |
filters, |
||||
methods: { |
pageNo: pageCurrent.value, |
||||
queryList(lineCode){ |
pageSize: pageSize.value |
||||
var filters =[] |
} |
||||
filters.push({ |
getCustomerItemList(params) |
||||
column: "customerCode", |
.then((res) => { |
||||
action: "==", |
if (res.data != null && res.data.list.length > 0) { |
||||
value: lineCode |
showList.value = res.data.list |
||||
}) |
total.value = res.data.total |
||||
|
isShow.value = true |
||||
|
} else { |
||||
|
// 没有查询到生产线对应的物料信息 |
||||
|
// this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的物料'); |
||||
|
isShow.value = true |
||||
|
} |
||||
|
}) |
||||
|
.catch((error) => { |
||||
|
// this.showErrorMessage(error); |
||||
|
}) |
||||
|
} |
||||
|
const openPopup = (items) => { |
||||
|
showList.value = items |
||||
|
isShow.value = true |
||||
|
} |
||||
|
const closePopup = () => { |
||||
|
isShow.value = false |
||||
|
} |
||||
|
const selectItem = (item) => { |
||||
|
emit('selectedItem', item) |
||||
|
isShow.value = false |
||||
|
} |
||||
|
const change = (e) => { |
||||
|
pageCurrent.value = e.current |
||||
|
} |
||||
|
|
||||
var params = { |
// 传递给父类 |
||||
filters: filters, |
const emit = defineEmits(['selectedItem']) |
||||
pageNo: this.pageCurrent, |
defineExpose({ |
||||
pageSize: this.pageSize, |
queryList |
||||
} |
}) |
||||
getCustomerItemList(params).then(res => { |
|
||||
if (res.data != null && res.data.list.length > 0) { |
|
||||
this.showList = res.data.list; |
|
||||
this.total = res.data.total; |
|
||||
this.$forceUpdate() |
|
||||
this.$refs['popupItems'].open("center"); |
|
||||
} else { |
|
||||
//没有查询到生产线对应的物料信息 |
|
||||
// this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的物料'); |
|
||||
this.$refs['popupItems'].open("center"); |
|
||||
} |
|
||||
}).catch(error => { |
|
||||
// this.showErrorMessage(error); |
|
||||
}) |
|
||||
}, |
|
||||
openPopup(items) { |
|
||||
this.showList = items; |
|
||||
this.$refs['popupItems'].open("center"); |
|
||||
}, |
|
||||
closePopup() { |
|
||||
this.$refs.popupItems.close() |
|
||||
}, |
|
||||
selectItem(item) { |
|
||||
this.$emit("selectedItem", item); |
|
||||
this.$refs['popupItems'].close(); |
|
||||
}, |
|
||||
change(e){ |
|
||||
this.pageCurrent = e.current |
|
||||
console.log("分页",e.current) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.fixed-bottom { |
.fixed-bottom { |
||||
position: fixed; |
position: fixed; |
||||
bottom: 0; |
bottom: 0; |
||||
width: 100%; |
width: 100%; |
||||
text-align: center; |
text-align: center; |
||||
background-color: #fff; |
background-color: #fff; |
||||
padding: 10px 0; |
padding: 10px 0; |
||||
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); |
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,39 +1,21 @@ |
|||||
<template> |
<template> |
||||
<view class="pack_view uni-inline-item"> |
<view class="pack_view uni-inline-item"> |
||||
<text style="color: #606266;font-size: 13px;">生产线</text> |
<text style="color: #606266; font-size: 13px">生产线</text> |
||||
<text style="color: #606266;font-size: 13px;">{{dataContent.productionLineCode}}</text> |
<text style="color: #606266; font-size: 13px">{{ dataContent.productionLineCode }}</text> |
||||
</view> |
</view> |
||||
<view class="pack_view uni-inline-item"> |
<view class="pack_view uni-inline-item"> |
||||
<text style="color: #606266;font-size: 13px;">生产日期</text> |
<text style="color: #606266; font-size: 13px">生产日期</text> |
||||
<text style="color: #606266;font-size: 13px;">{{dataContent.produceDate}}</text> |
<text style="color: #606266; font-size: 13px">{{ dataContent.produceDate }}</text> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
export default { |
const props = defineProps({ |
||||
components: { |
dataContent: { |
||||
|
type: Object, |
||||
}, |
default: {} |
||||
|
} |
||||
data() { |
}) |
||||
return { |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,215 +1,204 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" mode="bottom"> |
||||
<view class="uni-flex uni-column pop_customer"> |
<view class="uni-flex uni-column pop_customer"> |
||||
<view class="" style="padding:10rpx"> |
<view class="" style="padding: 10rpx"> |
||||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
||||
<view class="" style="font-size: 35rpx;"> |
<view class="" style="font-size: 35rpx"> |
||||
{{title}} |
{{ title }} |
||||
</view> |
</view> |
||||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
||||
@click="closeEditPopup"></image> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
||||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
<view class="uni-flex uni-column"> |
||||
<view class="uni-flex uni-column "> |
<view class="uni-flex uni-row space-between padding title"> |
||||
<view class="uni-flex uni-row space-between padding title "> |
<text>包装数量 : </text> |
||||
<text>标包个数 : </text> |
<view class="uni-flex uni-row u-col-center"> |
||||
<view class="uni-flex uni-row u-col-center"> |
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box> |
||||
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount"> |
<!-- <uom :uom="dataContent.uom"></uom> --> |
||||
</uni-number-box> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
<!-- <uom :uom="dataContent.packUnit"></uom> --> |
<view class="split_line"></view> |
||||
</view> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
</view> |
<text>标包量 : </text> |
||||
<view class='split_line'></view> |
<view class="uni-flex u-col-center uni-row"> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<text>{{ Number(dataContent.packQty) }}</text> |
||||
<text>标包量 : </text> |
<uom :uom="dataContent.uom"></uom> |
||||
<view class="uni-flex u-col-center uni-row"> |
</view> |
||||
<text>{{Number(dataContent.packQty)}}</text> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
<view class='split_line'></view> |
<view class="split_line"></view> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<text>数量 : </text> |
<text>数量 : </text> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<input class="qty_input" v-model="allQty" :focus="true" type="number" |
<input class="qty_input" v-model="allQty" :focus="true" type="number" @confirm="confirm()" @input="checkNum" :maxlength="maxlength" /> |
||||
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" /> |
<uom :uom="dataContent.uom"></uom> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<text>库存数量 : </text> |
||||
<text>库存数量 : </text> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text> |
||||
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text> |
<uom :uom="dataContent.uom"></uom> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" style="padding-left: 30rpx"> |
||||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" |
<text>库存状态 : </text> |
||||
style="padding-left: 30rpx;"> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<text>库存状态 : </text> |
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="allowEditStatus" @updateStatus="updateStatus"> </balanceStatus> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
</view> |
||||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" |
</view> |
||||
:allowEdit='allowEditStatus' @updateStatus="updateStatus"> |
<view class="split_line"></view> |
||||
</balanceStatus> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row hide_border"> |
||||
</view> |
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
||||
</view> |
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
||||
</view> |
</view> |
||||
<view class="uni-flex uni-row hide_border"> |
</view> |
||||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
</u-popup> |
||||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
<com-message ref="comMessageRef" /> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</uni-popup> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import uom from '@/mycomponents/qty/uom.vue' |
import { ref, getCurrentInstance, watch } from 'vue' |
||||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
import uom from '@/mycomponents/qty/uom.vue' |
||||
|
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
title: { |
||||
uom, |
type: String, |
||||
balanceStatus, |
default: '编辑数量' |
||||
}, |
}, |
||||
data() { |
settingParam: { |
||||
return { |
type: Object, |
||||
allQty: 0, |
default: {} |
||||
stdCount: 0, |
}, |
||||
stateData: 0, |
isShowStatus: { |
||||
balanceQty: 0, |
type: Boolean, |
||||
inventoryStatus: "", |
default: true |
||||
originalInventoryStatus: "", |
}, |
||||
dataContent: {}, |
allowEditStatus: { |
||||
handleQty: 0, |
type: Boolean, |
||||
maxlength: 10 |
default: false |
||||
} |
} |
||||
}, |
}) |
||||
watch: { |
const allQty = ref(0) |
||||
|
const stdCount = ref(0) |
||||
}, |
const inventoryStatus = ref('') |
||||
created() { |
const originalInventoryStatus = ref('') |
||||
|
const dataContent = ref({}) |
||||
}, |
const maxlength = ref(10) |
||||
|
const show = ref(false) |
||||
props: { |
const comMessageRef = ref() |
||||
title: { |
const toInventoryStatus = ref() |
||||
type: String, |
watch( |
||||
default: "编辑数量" |
() => allQty.value, |
||||
}, |
(newVal) => { |
||||
settingParam: { |
if (newVal % Number(dataContent.value.packQty) > 0) { |
||||
type: Object, |
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) + 1 |
||||
default: {} |
} else { |
||||
}, |
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) |
||||
isShowStatus: { |
} |
||||
type: Boolean, |
} |
||||
default: true |
) |
||||
}, |
const checkNum = (e) => { |
||||
allowEditStatus: { |
const { value } = e.detail |
||||
type: Boolean, |
const dot = value.indexOf('.') // 包含小数点 |
||||
default: false |
const reg = /^[0-9]+$/ // 正整数 |
||||
} |
if (dot > -1) { |
||||
}, |
maxlength.value = dot + 7 // 长度是小数点后两位 |
||||
methods: { |
if (value.length > dot + 7) { |
||||
checkNum(e) { |
} |
||||
let value = e.detail.value; |
} |
||||
let dot = value.indexOf('.'); //包含小数点 |
if (reg.test(value)) { |
||||
let reg = /^[0-9]+$/; //正整数 |
// 如果是正整数不包含小数点 |
||||
if (dot > -1) { |
maxlength.value = 10 |
||||
this.maxlength = dot + 7; //长度是小数点后两位 |
} |
||||
if (value.length > dot + 7) { |
} |
||||
|
const openEditPopup = (item, handleQty) => { |
||||
} |
dataContent.value = item |
||||
} |
inventoryStatus.value = dataContent.value.inventoryStatus |
||||
if (reg.test(value)) { //如果是正整数不包含小数点 |
originalInventoryStatus.value = dataContent.value.inventoryStatus |
||||
this.maxlength = 10; |
toInventoryStatus.value = dataContent.value.toInventoryStatus |
||||
} |
allQty.value = handleQty |
||||
}, |
setTimeout((res) => { |
||||
openEditPopup(item, handleQty) { |
show.value = true |
||||
this.dataContent = item |
}, 500) |
||||
this.inventoryStatus = this.dataContent.inventoryStatus |
} |
||||
this.originalInventoryStatus =this.dataContent.inventoryStatus; |
const closeEditPopup = () => { |
||||
this.toInventoryStatus = this.dataContent.toInventoryStatus |
show.value = false |
||||
this.allQty = handleQty |
} |
||||
setTimeout(res => { |
const confirm = () => { |
||||
this.$refs.popup.open('bottom') |
setValue() |
||||
}, 500) |
} |
||||
}, |
const cancel = () => { |
||||
closeEditPopup() { |
dataContent.value.inventoryStatus = originalInventoryStatus.value |
||||
this.$refs.popup.close() |
closeEditPopup() |
||||
}, |
} |
||||
confirm() { |
const calcQty = (e) => { |
||||
this.setValue(); |
if (e.value > 0) { |
||||
}, |
allQty.value = e.value * Number(dataContent.value.packQty) |
||||
cancel() { |
} |
||||
this.dataContent.inventoryStatus = this.originalInventoryStatus; |
} |
||||
this.closeEditPopup(); |
const setValue = () => { |
||||
}, |
const balanceQty = Number(dataContent.value.balanceQty) |
||||
calcQty(val) { |
if (allQty.value == 0) { |
||||
if (val > 0) { |
comMessageRef.value.showErrorMessage('数量必须大于0', (res) => { |
||||
this.allQty = val * Number(this.dataContent.packQty); |
if (res) { |
||||
} |
allQty.value = balanceQty |
||||
}, |
} |
||||
setValue() { |
}) |
||||
var balanceQty = Number(this.dataContent.balanceQty); |
} else if (allQty.value > balanceQty) { |
||||
if (this.allQty == 0) { |
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于库存数量[${balanceQty}]`, (res) => { |
||||
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0', |
if (res) { |
||||
res => { |
allQty.value = balanceQty |
||||
this.allQty = balanceQty; |
} |
||||
}) |
}) |
||||
} else if (this.allQty > balanceQty) { |
} else { |
||||
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']', |
callback() |
||||
res => { |
} |
||||
this.allQty = balanceQty; |
} |
||||
}) |
const callback = () => { |
||||
} else { |
const qty = Number(allQty.value) |
||||
this.callback(); |
dataContent.value.handleQty = qty |
||||
} |
if (props.allowEditStatus) { |
||||
}, |
// 只有编辑了库存状态,才给库存状态赋值 |
||||
callback() { |
dataContent.value.toInventoryStatus = inventoryStatus.value |
||||
let qty = Number(this.allQty); |
} |
||||
this.dataContent.handleQty = qty; |
emit('confirm', qty) |
||||
if (this.allowEditStatus) //只有编辑了库存状态,才给库存状态赋值 |
closeEditPopup() |
||||
{ |
} |
||||
this.dataContent.toInventoryStatus = this.inventoryStatus; |
const updateStatus = (value) => { |
||||
} |
inventoryStatus.value = value |
||||
this.$emit("confirm", qty); |
} |
||||
this.closeEditPopup(); |
// 传递给父类 |
||||
}, |
const emit = defineEmits(['confirm', 'clearResult']) |
||||
updateStatus(value) { |
defineExpose({ openEditPopup, closeEditPopup }) |
||||
this.inventoryStatus = value |
|
||||
console.log(this.inventoryStatus) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-popup .uni-popup__wrapper { |
.uni-popup .uni-popup__wrapper { |
||||
width: 100% !important; |
width: 100% !important; |
||||
padding: 30rpx; |
padding: 30rpx; |
||||
} |
} |
||||
|
|
||||
.hide_border { |
.hide_border { |
||||
button { |
button { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
|
|
||||
button::after { |
button::after { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.title { |
.title { |
||||
font-size: 30rpx; |
font-size: 30rpx; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,269 +1,238 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" mode="bottom"> |
||||
<view class="uni-flex uni-column pop_customer"> |
<view class="uni-flex uni-column pop_customer"> |
||||
<view class="" style="padding:10rpx"> |
<view class="" style="padding: 10rpx"> |
||||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
||||
<view class="" style="font-size: 35rpx;"> |
<view class="" style="font-size: 35rpx"> |
||||
{{title}} |
{{ title }} |
||||
</view> |
</view> |
||||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
||||
@click="closeEditPopup"></image> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
||||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
<view class="uni-flex uni-column"> |
||||
<view class="uni-flex uni-column "> |
<view class="uni-flex uni-row space-between padding title"> |
||||
<view class="uni-flex uni-row space-between padding title "> |
<text>标包个数 : </text> |
||||
<text>标包个数 : </text> |
<view class="uni-flex uni-row u-col-center"> |
||||
<view class="uni-flex uni-row u-col-center"> |
<!-- <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false"> |
||||
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false"> |
</uni-number-box> --> |
||||
</uni-number-box> |
<u-number-box v-model="stdCount" @change="calcQty($event, stdCount)" :focus="false"></u-number-box> |
||||
<view class="std_pack"> |
<view class="std_pack"> |
||||
{{getPackUnitInfo(dataContent.packUnit)}} |
{{ handleGetPackUnitInfo(dataContent.packUnit) }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<text>标包量 : </text> |
||||
<text>标包量 : </text> |
<view class="uni-flex u-col-center uni-row"> |
||||
<view class="uni-flex u-col-center uni-row"> |
<text>{{ Number(dataContent.packQty) }}</text> |
||||
<text>{{Number(dataContent.packQty)}}</text> |
<uom :uom="dataContent.uom"></uom> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
|
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<text>数量 : </text> |
||||
<text>数量 : </text> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
<input class="qty_input" v-model="allQty" :focus="true" type="number" @mousedown="mousedown" @input="checkNum" :maxlength="maxlength" /> |
||||
<input class="qty_input" v-model="allQty" :focus="true" type="number" |
<uom :uom="dataContent.uom"></uom> |
||||
@mousedown="mousedown" @input="checkNum" :maxlength="maxlength" /> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
</view> |
<view v-if="isShowBalance" class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<view class='split_line'></view> |
<text>库存数量 : </text> |
||||
<view v-if="isShowBalance" |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
class="uni-flex uni-row space-between padding title u-col-center"> |
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text> |
||||
<text>库存数量 : </text> |
<uom :uom="dataContent.uom"></uom> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
</view> |
||||
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
<view class="split_line"></view> |
||||
</view> |
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" style="align-items: center; padding-left: 30rpx"> |
||||
</view> |
<text>库存状态 : </text> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" |
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="true" @updateStatus="updateStatus" @onOpen="clickState"> </balanceStatus> |
||||
style="align-items: center; padding-left: 30rpx;"> |
</view> |
||||
<text>库存状态 : </text> |
</view> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
<view class="split_line"></view> |
||||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='true' |
</view> |
||||
@updateStatus="updateStatus" @onOpen="clickState"> |
</view> |
||||
</balanceStatus> |
</view> |
||||
</view> |
<view class="uni-flex uni-row hide_border"> |
||||
</view> |
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
||||
<view class='split_line'></view> |
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认({{ seconds }}s关闭)</button> |
||||
</view> |
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="uni-flex uni-row hide_border"> |
</u-popup> |
||||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
<com-message ref="comMessageRef" /> |
||||
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" |
</view> |
||||
@click="confirm()">确认({{seconds}}s关闭)</button> |
|
||||
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" |
|
||||
@click="confirm()">确认</button> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
</uni-popup> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import uom from '@/mycomponents/qty/uom.vue' |
import { ref, getCurrentInstance } from 'vue' |
||||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
import uom from '@/mycomponents/qty/uom.vue' |
||||
import { |
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
||||
getPackUnitInfo |
import { getPackUnitInfo, getInventoryStatusName } from '@/common/directory.js' |
||||
} from "@/common/directory.js" |
|
||||
import { |
const props = defineProps({ |
||||
getInventoryStatusName |
title: { |
||||
} from '@/common/directory.js'; |
type: String, |
||||
|
default: '编辑数量' |
||||
export default { |
}, |
||||
components: { |
settingParam: { |
||||
uom, |
type: Object, |
||||
balanceStatus, |
default: {} |
||||
}, |
}, |
||||
data() { |
isShowStatus: { |
||||
return { |
type: Boolean, |
||||
allQty: 0, |
default: true |
||||
stdCount: 0, |
}, |
||||
stateData: 0, |
isShowBalance: { |
||||
balanceQty: 0, |
type: Boolean, |
||||
inventoryStatus: "", |
default: true |
||||
dataContent: {}, |
}, |
||||
handleQty: 0, |
allowEditStatus: { |
||||
seconds: 0, |
type: Boolean, |
||||
timer: {}, |
default: false |
||||
showConfirmCountdown: false, |
} |
||||
detailList: [], |
}) |
||||
maxlength: 10, |
const allQty = ref(0) |
||||
mode: 'add' //add 新增 edit 编辑 |
const stdCount = ref(0) |
||||
} |
const stateData = ref(0) |
||||
}, |
const balanceQty = ref(0) |
||||
watch: { |
const inventoryStatus = ref('') |
||||
|
const dataContent = ref({}) |
||||
}, |
const handleQty = ref(0) |
||||
created() { |
const seconds = ref(0) |
||||
|
const timer = ref({}) |
||||
}, |
const showConfirmCountdown = ref(false) |
||||
|
const detailList = ref([]) |
||||
props: { |
const maxlength = ref(10) |
||||
title: { |
const show = ref(false) |
||||
type: String, |
const mode = ref('add') // add 新增 edit 编辑 |
||||
default: "编辑数量" |
const checkNum = (e) => { |
||||
}, |
const { value } = e.detail |
||||
settingParam: { |
const dot = value.indexOf('.') // 包含小数点 |
||||
type: Object, |
const reg = /^[0-9]+$/ // 正整数 |
||||
default: {} |
if (dot > -1) { |
||||
}, |
maxlength.value = dot + 7 // 长度是小数点后两位 |
||||
isShowStatus: { |
if (value.length > dot + 7) { |
||||
type: Boolean, |
} |
||||
default: true |
} |
||||
}, |
if (reg.test(value)) { |
||||
isShowBalance: { |
// 如果是正整数不包含小数点 |
||||
type: Boolean, |
maxlength.value = 10 |
||||
default: true |
} |
||||
}, |
} |
||||
allowEditStatus: { |
|
||||
type: Boolean, |
const openEditPopup = (item, detailList) => { |
||||
default: false |
initData(item, detailList) |
||||
}, |
showConfirmCountdown.value = false |
||||
}, |
mode.value = 'edit' |
||||
methods: { |
setTimeout((res) => { |
||||
checkNum(e) { |
show.value = true |
||||
let value = e.detail.value; |
}, 500) |
||||
let dot = value.indexOf('.'); //包含小数点 |
clearInterval(timer.value) |
||||
let reg = /^[0-9]+$/; //正整数 |
} |
||||
if (dot > -1) { |
|
||||
this.maxlength = dot + 7; //长度是小数点后两位 |
// 新增时弹出 |
||||
if (value.length > dot + 7) { |
|
||||
|
const openEditPopupShowSeconds = (item, detailList) => { |
||||
} |
initData(item, detailList) |
||||
} |
showConfirmCountdown.value = true |
||||
if (reg.test(value)) { //如果是正整数不包含小数点 |
mode.value = 'add' |
||||
this.maxlength = 10; |
setTimeout((res) => { |
||||
} |
show.value = true |
||||
}, |
}, 500) |
||||
|
startTimer() |
||||
//编辑时弹出 |
} |
||||
openEditPopup(item, detailList) { |
|
||||
this.initData(item, detailList); |
const initData = (item, detailListParams) => { |
||||
// this.dataContent = item |
dataContent.value = item |
||||
// this.inventoryStatus = this.dataContent.inventoryStatus; |
inventoryStatus.value = dataContent.value.inventoryStatus |
||||
// this.allQty = Number(this.dataContent.qty) |
allQty.value = Number(dataContent.value.handleQty) |
||||
// this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); |
stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty) |
||||
// this.detailList = detailList |
detailList.value = detailListParams |
||||
this.showConfirmCountdown = false; |
} |
||||
this.mode = 'edit'; |
|
||||
setTimeout(res => { |
const mousedown = () => { |
||||
this.$refs.popup.open('bottom') |
showConfirmCountdown.value = false |
||||
}, 500) |
clearInterval(timer.value) |
||||
clearInterval(this.timer) |
} |
||||
}, |
|
||||
|
const clickState = () => { |
||||
//新增时弹出 |
showConfirmCountdown.value = false |
||||
openEditPopupShowSeconds(item, detailList) { |
clearInterval(timer.value) |
||||
this.initData(item, detailList); |
} |
||||
this.showConfirmCountdown = true; |
|
||||
this.mode = 'add'; |
const closeEditPopup = () => { |
||||
setTimeout(res => { |
clearInterval(timer.value) |
||||
this.$refs.popup.open('bottom') |
emit('close') |
||||
}, 500) |
show.value = false |
||||
this.startTimer() |
} |
||||
}, |
const confirm = () => { |
||||
|
setValue() |
||||
initData(item, detailList) { |
} |
||||
this.dataContent = item; |
const cancel = () => { |
||||
this.inventoryStatus = this.dataContent.inventoryStatus; |
closeEditPopup() |
||||
this.allQty = Number(this.dataContent.handleQty); |
} |
||||
this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); |
const startTimer = () => { |
||||
this.detailList = detailList; |
seconds.value = 3 |
||||
}, |
clearInterval(timer.value) |
||||
|
timer.value = setInterval(() => { |
||||
mousedown() { |
seconds.value-- |
||||
this.showConfirmCountdown = false; |
if (seconds.value <= 0) { |
||||
clearInterval(this.timer) |
confirm() |
||||
}, |
// this.cancel() |
||||
|
} |
||||
clickState() { |
}, 1000) |
||||
this.showConfirmCountdown = false; |
} |
||||
clearInterval(this.timer) |
const calcQty = (val) => { |
||||
}, |
if (val > 0) { |
||||
|
allQty.value = val * Number(dataContent.value.packQty) |
||||
closeEditPopup() { |
} |
||||
clearInterval(this.timer) |
} |
||||
this.$emit("close"); |
|
||||
this.$refs.popup.close() |
const setValue = () => { |
||||
}, |
dataContent.value.handleQty = Number(allQty.value) |
||||
confirm() { |
emit('confirm', Number(allQty.value), inventoryStatus.value, mode.value) |
||||
this.setValue(); |
closeEditPopup() |
||||
}, |
} |
||||
cancel() { |
|
||||
this.closeEditPopup(); |
const updateStatus = (value) => { |
||||
}, |
inventoryStatus.value = value |
||||
startTimer() { |
} |
||||
this.seconds = 3; |
|
||||
clearInterval(this.timer) |
const handleGetPackUnitInfo = (value) => { |
||||
this.timer = setInterval(() => { |
return getPackUnitInfo(value).name |
||||
this.seconds-- |
} |
||||
if (this.seconds <= 0) { |
// 传递给父类 |
||||
this.confirm(); |
const emit = defineEmits(['close', 'confirm']) |
||||
// this.cancel() |
defineExpose({ |
||||
return |
openEditPopupShowSeconds, |
||||
} |
openEditPopup |
||||
}, 1000) |
}) |
||||
}, |
|
||||
calcQty(val) { |
|
||||
if (val > 0) { |
|
||||
this.allQty = val * Number(this.dataContent.packQty); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
setValue() { |
|
||||
this.dataContent.handleQty = Number(this.allQty) |
|
||||
this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode); |
|
||||
this.closeEditPopup(); |
|
||||
}, |
|
||||
|
|
||||
updateStatus(value) { |
|
||||
this.inventoryStatus = value |
|
||||
}, |
|
||||
|
|
||||
getPackUnitInfo(value) { |
|
||||
return getPackUnitInfo(value).name |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-popup .uni-popup__wrapper { |
.uni-popup .uni-popup__wrapper { |
||||
width: 100% !important; |
width: 100% !important; |
||||
padding: 30rpx; |
padding: 30rpx; |
||||
} |
} |
||||
|
|
||||
.hide_border { |
.hide_border { |
||||
button { |
button { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
|
|
||||
button::after { |
button::after { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.title { |
.title { |
||||
font-size: 30rpx; |
font-size: 30rpx; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,64 +1,42 @@ |
|||||
<template> |
<template> |
||||
<view class="center uni-column"> |
<view class="center uni-column"> |
||||
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status> |
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status> |
||||
<view class="uni-flex uni-row"> |
<view class="uni-flex uni-row"> |
||||
<view class="text_default center"> |
<view class="text_default center"> |
||||
{{Number(dataContent.qty)}} |
{{ Number(dataContent.qty) }} |
||||
</view> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
<uom :uom="dataContent.uom"></uom> |
||||
</view> |
</view> |
||||
|
|
||||
<view> |
<view> |
||||
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import packQty from '@/mycomponents/qty/packQty.vue' |
||||
|
import uom from '@/mycomponents/qty/uom.vue' |
||||
|
import status from '@/mycomponents/status/status.vue' |
||||
|
import packUnit from '@/mycomponents/qty/packUnit.vue' |
||||
|
|
||||
<script> |
const props = defineProps({ |
||||
import packQty from '@/mycomponents/qty/packQty.vue' |
dataContent: { |
||||
import uom from '@/mycomponents/qty/uom.vue' |
type: Object, |
||||
import status from '@/mycomponents/status/status.vue' |
default: null |
||||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
}, |
||||
|
isShowStatus: { |
||||
export default { |
type: Boolean, |
||||
components: { |
default: true |
||||
packQty, |
}, |
||||
status, |
isShowPack: { |
||||
uom, |
type: Boolean, |
||||
packUnit |
default: true |
||||
}, |
}, |
||||
data() { |
isShowPackUnit: { |
||||
return { |
type: Boolean, |
||||
|
default: true |
||||
}; |
} |
||||
}, |
}) |
||||
// 此处定义传入的数据 |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: null |
|
||||
}, |
|
||||
isShowStatus: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowPackUnit: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"></style> |
||||
</style> |
|
||||
|
@ -1,236 +1,202 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<uni-popup ref="popup"> |
<u-popup v-model="show" mode="bottom"> |
||||
<view class="uni-flex uni-column pop_customer"> |
<view class="uni-flex uni-column pop_customer"> |
||||
<view class="" style="padding:10rpx"> |
<view class="" style="padding: 10rpx"> |
||||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
||||
<view class="" style="font-size: 35rpx;"> |
<view class="" style="font-size: 35rpx"> |
||||
{{title}} |
{{ title }} |
||||
</view> |
</view> |
||||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
||||
@click="closeEditPopup"></image> |
</view> |
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
||||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
<view class="uni-flex uni-column"> |
||||
<view class="uni-flex uni-column "> |
<view class="uni-flex uni-row space-between padding title"> |
||||
<view class="uni-flex uni-row space-between padding title "> |
<text>包装个数 : </text> |
||||
<text>包装个数 : </text> |
<view class="uni-flex uni-row u-col-center"> |
||||
<view class="uni-flex uni-row u-col-center"> |
<!-- <uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount"> |
||||
<uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount"> |
</uni-number-box> --> |
||||
</uni-number-box> |
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box> |
||||
{{getPackUnitName(dataContent.packUnit)}} |
{{ handleGetPackUnitName(dataContent.packUnit) }} |
||||
</view> |
</view> |
||||
|
</view> |
||||
|
<view class="split_line"></view> |
||||
|
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
|
<text>包装规格 : </text> |
||||
|
<view class="uni-flex u-col-center uni-row"> |
||||
|
<packUnit :dataContent="dataContent"></packUnit> |
||||
|
</view> |
||||
|
</view> |
||||
|
|
||||
</view> |
<view class="split_line"></view> |
||||
<view class='split_line'></view> |
<view class="uni-flex uni-row space-between padding title u-col-center"> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
<text>总数量 : </text> |
||||
<text>包装规格 : </text> |
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
||||
<view class="uni-flex u-col-center uni-row"> |
<input class="qty_input" v-model="allQty" :focus="false" type="number" @input="checkNum" @confirm="confirm()" :maxlength="maxlength" /> |
||||
<packUnit :dataContent="dataContent"></packUnit> |
<uom :uom="dataContent.uom"></uom> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
<view class="split_line"></view> |
||||
|
</view> |
||||
<view class='split_line'></view> |
</view> |
||||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
</view> |
||||
<text>总数量 : </text> |
<view class="uni-flex uni-row hide_border"> |
||||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
||||
<input class="qty_input" v-model="allQty" :focus="false" type="number" |
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
||||
@input="checkNum" @confirm="confirm()" :maxlength="maxlength" /> |
</view> |
||||
<uom :uom="dataContent.uom"></uom> |
</view> |
||||
</view> |
</u-popup> |
||||
</view> |
<com-message ref="comMessageRef" /> |
||||
<view class='split_line'></view> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
<view class="uni-flex uni-row hide_border"> |
|
||||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|
||||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|
||||
</view> |
|
||||
</view> |
|
||||
</uni-popup> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import { |
import { ref, getCurrentInstance } from 'vue' |
||||
getUomInfo, |
import { getUomInfo, getPackUnitName } from '@/common/directory.js' |
||||
getPackUnitName |
import uom from '@/mycomponents/qty/uom.vue' |
||||
} from '@/common/directory.js'; |
import stdUom from '@/mycomponents/qty/stdUom.vue' |
||||
import uom from '@/mycomponents/qty/uom.vue' |
import packUnit from '@/mycomponents/qty/packUnit.vue' |
||||
import stdUom from '@/mycomponents/qty/stdUom.vue' |
|
||||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|
||||
export default { |
|
||||
components: { |
|
||||
uom, |
|
||||
stdUom, |
|
||||
packUnit |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
allQty: 0, |
|
||||
stdCount: 0, |
|
||||
labelQty: 0, |
|
||||
recommendQty: 0, |
|
||||
maxlength: 10 |
|
||||
} |
|
||||
}, |
|
||||
watch: { |
|
||||
// handleQty: { |
|
||||
// handler(newval, oldval) { |
|
||||
// this.allQty = Number(this.handleQty) |
|
||||
// }, |
|
||||
// immediate: true, |
|
||||
// deep: true |
|
||||
// } |
|
||||
}, |
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
props: { |
const props = defineProps({ |
||||
title: { |
title: { |
||||
type: String, |
type: String, |
||||
default: "编辑数量" |
default: '编辑数量' |
||||
}, |
}, |
||||
dataContent: { |
dataContent: { |
||||
type: Object, |
type: Object, |
||||
default: null |
default: null |
||||
}, |
}, |
||||
handleQty: { |
handleQty: { |
||||
type: Number, |
type: Number, |
||||
default: 0 |
default: 0 |
||||
}, |
}, |
||||
settingParam: { |
settingParam: { |
||||
type: Object, |
type: Object, |
||||
default: null |
default: null |
||||
}, |
} |
||||
}, |
}) |
||||
methods: { |
const allQty = ref(0) |
||||
getPackUnitName(packUnit) { |
const stdCount = ref(0) |
||||
let unit = getPackUnitName(packUnit); |
const labelQty = ref(0) |
||||
return unit; |
const recommendQty = ref(0) |
||||
}, |
const maxlength = ref(0) |
||||
checkNum(e) { |
const show = ref(false) |
||||
let value = e.detail.value; |
const comMessageRef = ref() |
||||
let dot = value.indexOf('.'); //包含小数点 |
const dataContent = ref(props.dataContent) |
||||
let reg = /^[0-9]+$/; //正整数 |
const handleGetPackUnitName = (packUnit) => { |
||||
if (dot > -1) { |
const unit = getPackUnitName(packUnit) |
||||
this.maxlength = dot + 7; //长度是小数点后两位 |
return unit |
||||
if (value.length > dot + 7) { |
} |
||||
|
const checkNum = (e) => { |
||||
|
const { value } = e.detail |
||||
|
const dot = value.indexOf('.') // 包含小数点 |
||||
|
const reg = /^[0-9]+$/ // 正整数 |
||||
|
if (dot > -1) { |
||||
|
maxlength.value = dot + 7 // 长度是小数点后两位 |
||||
|
if (value.length > dot + 7) { |
||||
|
} |
||||
|
} |
||||
|
if (reg.test(value)) { |
||||
|
// 如果是正整数不包含小数点 |
||||
|
maxlength.value = 10 |
||||
|
} |
||||
|
} |
||||
|
const openEditPopup = () => { |
||||
|
setTimeout((res) => { |
||||
|
show.value = true |
||||
|
}, 500) |
||||
|
} |
||||
|
|
||||
} |
const openTaskEditPopup = (recommendQtyParams, handleQty, labelQtyParams) => { |
||||
} |
// dataContent.value = |
||||
if (reg.test(value)) { //如果是正整数不包含小数点 |
recommendQty.value = Number(recommendQtyParams) |
||||
this.maxlength = 10; |
labelQty.value = Number(labelQtyParams) |
||||
} |
allQty.value = Number(handleQty) |
||||
}, |
setTimeout((res) => { |
||||
openEditPopup() { |
show.value = true |
||||
setTimeout(res => { |
}, 500) |
||||
this.$refs.popup.open('bottom') |
} |
||||
}, 500) |
const openRecordEditPopup = (labelQtyParams, item) => { |
||||
}, |
dataContent.value = item |
||||
openTaskEditPopup(recommendQty, handleQty, labelQty) { |
recommendQty.value = 0 |
||||
this.recommendQty = Number(recommendQty); |
labelQty.value = Number(labelQtyParams) |
||||
this.labelQty = Number(labelQty); |
allQty.value = Number(labelQtyParams) |
||||
this.allQty = Number(handleQty) |
setTimeout((res) => { |
||||
setTimeout(res => { |
show.value = true |
||||
this.$refs.popup.open('bottom') |
}, 500) |
||||
}, 500) |
} |
||||
}, |
const closeEditPopup = () => { |
||||
openRecordEditPopup(labelQty) { |
show.value = false |
||||
this.recommendQty = 0; |
} |
||||
this.labelQty = Number(labelQty); |
const confirm = () => { |
||||
this.allQty = Number(labelQty) |
setValue() |
||||
setTimeout(res => { |
} |
||||
this.$refs.popup.open('bottom') |
const cancel = () => { |
||||
}, 500) |
closeEditPopup() |
||||
}, |
} |
||||
closeEditPopup() { |
const calcQty = (e) => { |
||||
this.$refs.popup.close() |
if (e.value > 0) { |
||||
}, |
allQty.value = e.value * dataContent.value.packQty |
||||
confirm() { |
} |
||||
this.setValue(); |
} |
||||
}, |
const setValue = () => { |
||||
cancel() { |
// var recommendQty = Number(this.dataContent.qty); |
||||
this.closeEditPopup(); |
// var labelQty = Number(this.dataContent.record.label.qty); |
||||
}, |
if (allQty.value > labelQty.value) { |
||||
calcQty(val) { |
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于标签数量[${labelQty.value}]`, (res) => { |
||||
if (val > 0) { |
allQty.value = labelQty.value |
||||
this.allQty = val * this.dataContent.packQty; |
}) |
||||
} |
} else if (recommendQty.value != 0) { |
||||
}, |
if (allQty.value > recommendQty.value) { |
||||
setValue() { |
if (props.settingParam.allowBiggerQty != null && props.settingParam.allowBiggerQty == 'TRUE') { |
||||
// var recommendQty = Number(this.dataContent.qty); |
callback() |
||||
// var labelQty = Number(this.dataContent.record.label.qty); |
} else { |
||||
if (this.allQty > this.labelQty) { |
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于推荐数量[${recommendQty.value}]`, (res) => { |
||||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' + |
allQty.value = labelQty.value |
||||
this.labelQty + |
}) |
||||
']', |
} |
||||
res => { |
} else if (allQty.value < recommendQty.value) { |
||||
this.allQty = this.labelQty; |
if (props.settingParam.allowSmallerQty != null && props.settingParam.allowSmallerQty == 'TRUE') { |
||||
}) |
callback() |
||||
} else { |
} else { |
||||
if (this.recommendQty != 0) { |
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许小于推荐数量[${recommendQty.value}]`, (res) => { |
||||
if (this.allQty > this.recommendQty) { |
allQty.value = labelQty.value |
||||
if (this.settingParam.allowBiggerQty != null && this.settingParam.allowBiggerQty == |
}) |
||||
"TRUE") { |
} |
||||
this.callback(); |
} else { |
||||
} else { |
callback() |
||||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于推荐数量[' + |
} |
||||
this.recommendQty + |
} else { |
||||
']', |
callback() |
||||
res => { |
} |
||||
this.allQty = this.labelQty; |
} |
||||
}) |
const callback = () => { |
||||
} |
emit('confirm', Number(allQty.value)) |
||||
} else if (this.allQty < this.recommendQty) { |
closeEditPopup() |
||||
if (this.settingParam.allowSmallerQty != null && this.settingParam.allowSmallerQty == |
} |
||||
"TRUE") { |
// 传递给父类 |
||||
this.callback(); |
const emit = defineEmits(['confirm']) |
||||
} else { |
defineExpose({ openTaskEditPopup, openRecordEditPopup }) |
||||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许小于推荐数量[' + |
|
||||
this.recommendQty + |
|
||||
']', |
|
||||
res => { |
|
||||
this.allQty = this.labelQty; |
|
||||
}) |
|
||||
} |
|
||||
} else { |
|
||||
this.callback(); |
|
||||
} |
|
||||
} else { |
|
||||
this.callback(); |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
callback() { |
|
||||
this.$emit("confirm", Number(this.allQty)); |
|
||||
this.closeEditPopup(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-popup .uni-popup__wrapper { |
.uni-popup .uni-popup__wrapper { |
||||
width: 100% !important; |
width: 100% !important; |
||||
padding: 30rpx; |
padding: 30rpx; |
||||
} |
} |
||||
|
|
||||
.hide_border { |
.hide_border { |
||||
button { |
button { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
|
|
||||
button::after { |
button::after { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.title { |
.title { |
||||
font-size: 30rpx; |
font-size: 30rpx; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,157 +1,103 @@ |
|||||
<template> |
<template> |
||||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;"> |
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20"> |
||||
<view class="uni-flex uni-row space-between" style="align-items: center"> |
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center"> |
||||
<!-- uni-inline-item 暂时拿掉--> |
<!-- uni-inline-item 暂时拿掉--> |
||||
<view style="word-break: break-all;"> |
<view style="word-break: break-all"> |
||||
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> |
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> |
||||
</container> --> |
</container> --> |
||||
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack> |
<pack v-if="isShowPack && detail.packingNumber != null" :packingCode="detail.packingNumber"></pack> |
||||
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch> |
<batch v-if="isShowBatch && detail.batch != null" :batch="detail.batch"></batch> |
||||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> |
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location> |
||||
</location> |
<!-- <to-location></to-location> --> |
||||
<!-- <to-location></to-location> --> |
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </to-location> |
||||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> |
</view> |
||||
</to-location> |
<view style="word-break: break-all" class="uni-flex uni-row center"> |
||||
</view> |
<!-- ||detail.handleQty==0 可能会有扫描到0的情况--> |
||||
<view style="word-break: break-all;" class="uni-flex uni-row center"> |
<recommend-qty v-if="detail.handleQty == null || detail.handleQty == undefined" :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> |
||||
<!-- ||detail.handleQty==0 可能会有扫描到0的情况--> |
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty> |
||||
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|
||||
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> |
|
||||
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" |
|
||||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> |
|
||||
</compare-qty> |
|
||||
|
|
||||
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> |
<view v-if="isDevlement()"> |
||||
<text style="font-size: 30rpx;color: #2979ff; width: 20px; " @click="copy">复制</text> |
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" /> |
||||
<!-- <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> --> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import container from '@/mycomponents/container/container.vue' |
import container from '@/mycomponents/container/container.vue' |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
import toLocation from '@/mycomponents/balance/toLocation.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
import config from '@/static/config.js' |
import config from '@/static/config.js' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
detail: { |
||||
container, |
type: Object, |
||||
pack, |
default: {} |
||||
location, |
}, |
||||
toLocation, |
isShowContainer: { |
||||
batch, |
type: Boolean, |
||||
recommendQty, |
default: true |
||||
compareQty |
}, |
||||
}, |
isShowPack: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowBatch: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowFromLocation: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowToLocation: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isShowStatus: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
|
||||
data() { |
locationTitle: { |
||||
return { |
type: String, |
||||
|
default: '库位' |
||||
|
} |
||||
|
}) |
||||
|
const copy = () => { |
||||
|
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
|
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
||||
|
|
||||
} |
uni.setClipboardData({ |
||||
}, |
data: content, |
||||
props: { |
success: () => { |
||||
detail: { |
uni.showToast({ |
||||
type: Object, |
title: '复制采购标签成功' |
||||
default: {} |
}) |
||||
}, |
} |
||||
isShowContainer: { |
}) |
||||
type: Boolean, |
} |
||||
default: true |
const copyPro = () => { |
||||
}, |
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
isShowPack: { |
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowBatch: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowFromLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowToLocation: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
isShowStatus: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
|
|
||||
locationTitle: { |
uni.setClipboardData({ |
||||
type: String, |
data: content, |
||||
default: '库位' |
success: () => { |
||||
}, |
uni.showToast({ |
||||
|
title: '复制制品标签成功' |
||||
}, |
}) |
||||
watch: { |
} |
||||
|
}) |
||||
}, |
} |
||||
methods: { |
const isDevlement = () => { |
||||
copy() { |
return config.isDevelopment |
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
} |
||||
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|
||||
.batch + ";Q" + this.detail.qty |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制采购标签成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制采购标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
copyPro() { |
|
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|
||||
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|
||||
.batch + ";Q" + this.detail.qty |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制制品标签成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制制品标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
isDevlement() { |
|
||||
return config.isDevelopment; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,146 +1,95 @@ |
|||||
<template> |
<template> |
||||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> |
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff"> |
||||
<view class="uni-flex uni-row space-between "> |
<view class="uni-flex uni-row space-between"> |
||||
<!-- uni-inline-item 暂时拿掉--> |
<!-- uni-inline-item 暂时拿掉--> |
||||
<view> |
<view> |
||||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
||||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
||||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> |
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location> |
||||
</location> |
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </location> |
||||
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> |
</view> |
||||
</location> |
<view class="uni-flex uni-row center"> |
||||
</view> |
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
||||
<view class="uni-flex uni-row center"> |
|
||||
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|
||||
:isShowStdPack="false"></recommend-qty> --> |
:isShowStdPack="false"></recommend-qty> --> |
||||
<!-- {{detail.scaned}} --> |
<!-- {{detail.scaned}} --> |
||||
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" |
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned == true" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty> |
||||
:isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned==true" |
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()"> |
||||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> |
<text style="font-size: 24rpx; color: #2979ff" @click="copy">复制采购</text> |
||||
</compare-qty> |
<text style="font-size: 24rpx; color: #2979ff" @click="copyPro">|制品</text> |
||||
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()"> |
</view> |
||||
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text> |
</view> |
||||
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> |
</view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
import config from '@/static/config.js' |
import config from '@/static/config.js' |
||||
|
|
||||
export default { |
const props = defineProps({ |
||||
components: { |
detail: { |
||||
pack, |
type: Object, |
||||
location, |
default: {} |
||||
batch, |
}, |
||||
recommendQty, |
isShowPack: { |
||||
compareQty |
type: Boolean, |
||||
}, |
default: true |
||||
|
}, |
||||
|
isShowBatch: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowFromLocation: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowToLocation: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
|
||||
data() { |
locationTitle: { |
||||
return { |
type: String, |
||||
|
default: '库位' |
||||
|
}, |
||||
|
isShowRecommendQty: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
} |
||||
|
}) |
||||
|
const copy = () => { |
||||
|
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
|
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
||||
|
|
||||
} |
uni.setClipboardData({ |
||||
}, |
data: content, |
||||
props: { |
success: () => { |
||||
detail: { |
uni.showToast({ |
||||
type: Object, |
title: '复制采购标签成功' |
||||
default: {} |
}) |
||||
}, |
} |
||||
isShowPack: { |
}) |
||||
type: Boolean, |
} |
||||
default: true |
const copyPro = () => { |
||||
}, |
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
||||
isShowBatch: { |
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowFromLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowToLocation: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
|
|
||||
locationTitle: { |
uni.setClipboardData({ |
||||
type: String, |
data: content, |
||||
default: '库位' |
success: () => { |
||||
}, |
uni.showToast({ |
||||
isShowRecommendQty: { |
title: '复制制品标签成功' |
||||
type: Boolean, |
}) |
||||
default: true |
} |
||||
} |
}) |
||||
|
} |
||||
}, |
const isDevlement = () => { |
||||
watch: { |
return config.isDevelopment |
||||
|
} |
||||
}, |
|
||||
methods: { |
|
||||
copy() { |
|
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|
||||
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|
||||
.batch + ";Q" + this.detail.qty |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制采购标签成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制采购标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
copyPro() { |
|
||||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|
||||
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|
||||
.batch + ";Q" + this.detail.qty |
|
||||
// #ifdef H5 |
|
||||
this.$copyText(content).then( |
|
||||
res => { |
|
||||
uni.showToast({ |
|
||||
title: '复制制品标签成功', |
|
||||
icon: 'none' |
|
||||
}) |
|
||||
} |
|
||||
) |
|
||||
// #endif |
|
||||
// #ifndef H5 |
|
||||
uni.setClipboardData({ |
|
||||
data: content, |
|
||||
success: () => { |
|
||||
uni.showToast({ |
|
||||
title: '复制制品标签成功' |
|
||||
}) |
|
||||
} |
|
||||
}) |
|
||||
// #endif |
|
||||
}, |
|
||||
isDevlement() { |
|
||||
return config.isDevelopment; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,96 +1,68 @@ |
|||||
<template> |
<template> |
||||
<view :class="dataContent.scaned?'scan_view':''"> |
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
||||
<view class="uni-flex uni-row space-between uni-inline-item"> |
<view class="uni-flex uni-row space-between uni-inline-item"> |
||||
<view> |
<view> |
||||
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack> |
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack> |
||||
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch> |
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch> |
||||
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> |
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> |
||||
</view> |
</view> |
||||
<view> |
<view> |
||||
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
<qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty> |
||||
:isShowStdPack="isShowStdPack"></qty> |
|
||||
|
|
||||
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" |
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty> |
||||
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> |
</view> |
||||
</compare-qty> |
</view> |
||||
|
<view class="split_line"></view> |
||||
</view> |
</view> |
||||
</view> |
|
||||
<view class='split_line'></view> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import pack from '@/mycomponents/balance/pack.vue' |
import pack from '@/mycomponents/balance/pack.vue' |
||||
import location from '@/mycomponents/balance/location.vue' |
import location from '@/mycomponents/balance/location.vue' |
||||
import batch from '@/mycomponents/balance/batch.vue' |
import batch from '@/mycomponents/balance/batch.vue' |
||||
import qty from '@/mycomponents/qty/qty.vue' |
import qty from '@/mycomponents/qty/qty.vue' |
||||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
||||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
import compareQty from '@/mycomponents/qty/compareQty.vue' |
||||
import bussinessType from '@/mycomponents/balance/bussinessType.vue' |
import bussinessType from '@/mycomponents/balance/bussinessType.vue' |
||||
|
|
||||
export default { |
|
||||
components: { |
|
||||
pack, |
|
||||
location, |
|
||||
batch, |
|
||||
qty, |
|
||||
recommendQty, |
|
||||
compareQty, |
|
||||
bussinessType, |
|
||||
}, |
|
||||
|
|
||||
data() { |
|
||||
return { |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
isShowPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowBatch: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowLocation: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowStdPack: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
isShowBusiness: { |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
scaned: { |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
fromInventoryStatus: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
toInventoryStatus: { |
|
||||
type: String, |
|
||||
default: "" |
|
||||
}, |
|
||||
}, |
|
||||
watch: { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
|
|
||||
} |
const props = defineProps({ |
||||
} |
dataContent: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
isShowPack: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowBatch: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowLocation: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowStdPack: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowBusiness: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
scaned: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
fromInventoryStatus: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
toInventoryStatus: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,179 +1,150 @@ |
|||||
<template> |
<template> |
||||
<view class="" style="background-color: #fff;"> |
<view class="" style="background-color: #fff"> |
||||
<uni-collapse ref="collapse1" @change=""> |
<u-collapse ref="collapse1"> |
||||
<uni-collapse-item :open="true"> |
<u-collapse-item :open="true"> |
||||
<template v-slot:title> |
<template v-slot:title> |
||||
<uni-swipe-action ref="swipeAction"> |
<u-swipe-action :show="false" style="width: 90%" :options="removeOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => removeItem(event, dataContent)"> |
||||
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions"> |
<item-qty :dataContent="dataContent" :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty> |
||||
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
</u-swipe-action> |
||||
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty> |
</template> |
||||
</uni-swipe-action-item> |
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)"> |
||||
</uni-swipe-action> |
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance> |
||||
</template> |
</u-swipe-action> |
||||
<!-- <view class='split_line'></view> --> |
</u-collapse-item> |
||||
<view class="" v-for="(detail,index) in dataContent.subList"> |
</u-collapse> |
||||
<uni-swipe-action ref="swipeAction"> |
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm"></balance-qty-edit> |
||||
<uni-swipe-action-item @click="swipeClick($event,detail,index)" |
<record-detail-popup ref="recordDetailPopupRef"></record-detail-popup> |
||||
:right-options="detail.scaned?scanOptions:detailOptions"> |
<com-message ref="comMessageRef" /> |
||||
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" |
</view> |
||||
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> |
|
||||
</balance> |
|
||||
</uni-swipe-action-item> |
|
||||
</uni-swipe-action> |
|
||||
<!-- <view class='split_line'></view> --> |
|
||||
</view> |
|
||||
</uni-collapse-item> |
|
||||
</uni-collapse> |
|
||||
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit> |
|
||||
<record-detail-popup ref="recordDetailPopup"></record-detail-popup> |
|
||||
<!-- <balance-detail-popup ref="balanceDetailPopup"></balance-detail-popup> --> |
|
||||
<comMessage ref="comMessage"></comMessage> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import itemQty from '@/mycomponents/item/itemQty.vue' |
import { ref, onMounted, nextTick, watch } from 'vue' |
||||
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
import itemQty from '@/mycomponents/item/itemQty.vue' |
||||
import balance from '@/mycomponents/balance/balance.vue' |
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
||||
import recommend from '@/mycomponents/recommend/recommend.vue' |
import balance from '@/mycomponents/balance/balance.vue' |
||||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
||||
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue' |
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue' |
||||
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue' |
|
||||
import location from '@/mycomponents/balance/location.vue' |
|
||||
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue' |
|
||||
|
|
||||
import { |
import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js' |
||||
getDetailOption, |
|
||||
getDetailEditRemoveOption, |
|
||||
getClearOption |
|
||||
} from '@/common/array.js'; |
|
||||
export default { |
|
||||
components: { |
|
||||
itemQty, |
|
||||
recommend, |
|
||||
balance, |
|
||||
balanceQtyEdit, |
|
||||
balanceDetailPopup, |
|
||||
purchaseLabel, |
|
||||
location, |
|
||||
recordDetailPopup |
|
||||
// winListHint |
|
||||
}, |
|
||||
props: { |
|
||||
dataContent: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
settingParam: { |
|
||||
type: Object, |
|
||||
default: {} |
|
||||
}, |
|
||||
|
|
||||
isShowStatus: { |
const props = defineProps({ |
||||
type: Boolean, |
dataContent: { |
||||
default: false |
type: Object, |
||||
}, |
default: {} |
||||
|
}, |
||||
|
settingParam: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
|
||||
isShowFromLocation: { |
isShowStatus: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: true |
default: false |
||||
}, |
}, |
||||
|
|
||||
isShowToLocation: { |
isShowFromLocation: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: true |
default: true |
||||
}, |
}, |
||||
|
|
||||
isShowBalanceQty: { |
isShowToLocation: { |
||||
type: Boolean, |
type: Boolean, |
||||
default: false |
default: true |
||||
}, |
}, |
||||
}, |
|
||||
watch: { |
|
||||
dataContent: { |
|
||||
handler(newName, oldName) { |
|
||||
if (this.dataContent.subList.length > 0) { |
|
||||
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { |
|
||||
this.$nextTick(res => { |
|
||||
this.$refs.collapse1.resize() |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
immediate: true, |
|
||||
deep: true |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
data() { |
isShowBalanceQty: { |
||||
return { |
type: Boolean, |
||||
option: [], |
default: false |
||||
title: "推荐详情", |
} |
||||
showItem: {}, |
}) |
||||
editItem: {}, |
const collapse1 = ref() |
||||
detailOptions: [], |
// 监视属性 |
||||
scanOptions: [], |
watch( |
||||
removeOptions: [], |
() => props.dataContent, |
||||
dataList: [] |
(val) => { |
||||
} |
if (val.subList.length > 0) { |
||||
}, |
if (collapse1.value != undefined && collapse1.value != null) { |
||||
|
nextTick((res) => { |
||||
|
collapse1.value.init() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ immediate: true, deep: true } |
||||
|
) |
||||
|
const option = ref([]) |
||||
|
const title = ref('推荐详情') |
||||
|
const showItem = ref({}) |
||||
|
const editItem = ref({}) |
||||
|
const detailOptions = ref([]) |
||||
|
const scanOptions = ref([]) |
||||
|
const removeOptions = ref([]) |
||||
|
const dataList = ref([]) |
||||
|
const comMessageRef = ref('') |
||||
|
const balanceQtyEditRef = ref('') |
||||
|
const recordDetailPopupRef = ref('') |
||||
|
const dataContent = ref(props.dataContent) |
||||
|
dataContent.value.subList.forEach((item) => { |
||||
|
item.show = false |
||||
|
}) |
||||
|
onMounted(() => { |
||||
|
detailOptions.value = getDetailOption() |
||||
|
scanOptions.value = getDetailEditRemoveOption() |
||||
|
removeOptions.value = getClearOption() |
||||
|
}) |
||||
|
const removeItem = (params, dataContent) => { |
||||
|
const { text } = removeOptions.value[params[1]] |
||||
|
if (text == '清空') { |
||||
|
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => { |
||||
|
if (res) { |
||||
|
emit('removeItem') |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
const swipeClick = (params, item) => { |
||||
|
let text = '' |
||||
|
if (item.scaned) { |
||||
|
text = scanOptions.value[params[1]].text |
||||
|
} else { |
||||
|
text = detailOptions.value[params[1]].text |
||||
|
} |
||||
|
if (text == '详情') { |
||||
|
detail(item) |
||||
|
} else if (text == '编辑') { |
||||
|
edit(item) |
||||
|
} else if (text == '移除') { |
||||
|
remove(item, params[0]) |
||||
|
} |
||||
|
} |
||||
|
const edit = (item) => { |
||||
|
editItem.value = item |
||||
|
balanceQtyEditRef.value.openEditPopup(editItem.value, editItem.value.handleQty) |
||||
|
} |
||||
|
const detail = (item) => { |
||||
|
showItem.value = item |
||||
|
recordDetailPopupRef.value.openPopup(item) |
||||
|
} |
||||
|
const remove = (item, index) => { |
||||
|
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息', (res) => { |
||||
|
if (res) { |
||||
|
dataContent.value.subList.splice(index, 1) |
||||
|
emit('removePack') |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
const confirm = (qty) => { |
||||
|
editItem.value.handleQty = qty |
||||
|
emit('updateData') |
||||
|
} |
||||
|
|
||||
mounted() { |
// 传递给父类 |
||||
this.detailOptions = getDetailOption(); |
const emit = defineEmits(['updateData', 'removePack']) |
||||
this.scanOptions = getDetailEditRemoveOption(); |
|
||||
this.removeOptions = getClearOption(); |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
removeItem(e, dataContent) { |
|
||||
if (e.content.text == "清空") { |
|
||||
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?", |
|
||||
res => { |
|
||||
if (res) { |
|
||||
this.$emit('removeItem') |
|
||||
// this.$emit('removeItem', this.dataContent) |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
swipeClick(e, item, index) { |
|
||||
if (e.content.text == "详情") { |
|
||||
this.detail(item) |
|
||||
} else if (e.content.text == "编辑") { |
|
||||
this.edit(item) |
|
||||
} else if (e.content.text == "移除") { |
|
||||
this.remove(item, index) |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
edit(item) { |
|
||||
this.editItem = item; |
|
||||
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty); |
|
||||
}, |
|
||||
|
|
||||
detail(item) { |
|
||||
this.showItem = item; |
|
||||
this.$refs.recordDetailPopup.openPopup(item); |
|
||||
}, |
|
||||
|
|
||||
remove(item, index) { |
|
||||
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
||||
res => { |
|
||||
if (res) { |
|
||||
this.dataContent.subList.splice(index, 1) |
|
||||
this.$emit('removePack') |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
confirm(qty) { |
|
||||
// this.editItem.qty = qty; |
|
||||
this.editItem.handleQty = qty; |
|
||||
this.$emit('updateData') |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
|
::v-deep .u-arrow-down-icon { |
||||
|
margin-right: 0px !important; |
||||
|
} |
||||
</style> |
</style> |
||||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue