Merge branch 'master' of http://36.33.26.201:3000/bonus/bonus-material-app
This commit is contained in:
commit
a2a9c68ecd
|
|
@ -22,7 +22,7 @@
|
|||
<view class="fun-box-btn clear flex" @click="clear">
|
||||
<text>清空</text>
|
||||
</view>
|
||||
<view class="fun-box-btn confirm flex" @click="confirm">
|
||||
<view v-if="isLandscape" class="fun-box-btn confirm flex" @click="confirm">
|
||||
<text>确认</text>
|
||||
</view>
|
||||
<view class="fun-box-btn cancel flex" @click="cancel">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, getCurrentInstance } from 'vue'
|
||||
import { ref, reactive, watch, getCurrentInstance, onMounted, onUnmounted } from 'vue'
|
||||
import { useMemberStore } from '@/stores'
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'complete'])
|
||||
|
|
@ -71,6 +71,36 @@ if (memberStore.userInfo.nickName && memberStore.userInfo.nickName.length < 5) {
|
|||
|
||||
const paths = ref([]) // 保存所有笔迹(每笔是一组点数组)
|
||||
const PEN = { width: 6, color: '#000000' } // 若你已有类似配置可复用
|
||||
const isLandscape = ref(true) // 屏幕是否为横向
|
||||
|
||||
// 监听屏幕旋转
|
||||
const handleResize = () => {
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync()
|
||||
console.log('🚀 ~ handleResize ~ windowWidth, windowHeight:', windowWidth, windowHeight)
|
||||
isLandscape.value = windowWidth < windowHeight
|
||||
|
||||
// 重新绘制 canvas 背景
|
||||
setTimeout(() => {
|
||||
uni.createSelectorQuery()
|
||||
.in(_this)
|
||||
.select('#mycanvas')
|
||||
.fields({ size: true, rect: true }, (data) => {
|
||||
if (data) {
|
||||
drawBackground(canvaCtx, data.width, data.height)
|
||||
}
|
||||
})
|
||||
.exec()
|
||||
}, 50)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
uni.onWindowResize(handleResize)
|
||||
handleResize() // 初始执行一次
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.offWindowResize(handleResize)
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
|
|
|
|||
|
|
@ -55,11 +55,29 @@
|
|||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
<!-- <uni-col :span="6">
|
||||
<view class="addBtn" @click="getList">查询</view>
|
||||
</uni-col> -->
|
||||
</uni-row>
|
||||
<uni-row
|
||||
:gutter="30"
|
||||
style="display: flex; margin-top: -15px;"
|
||||
>
|
||||
<uni-col :span="24">
|
||||
<uni-forms-item name="typeName" >
|
||||
<uni-data-select
|
||||
v-model="queryParams.typeName"
|
||||
:localdata="typeList"
|
||||
placeholder="选择物资类型"
|
||||
:searchable="false"
|
||||
filterable
|
||||
></uni-data-select>
|
||||
</uni-forms-item>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="addBtn" @click="getList">查询</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
</div>
|
||||
|
||||
<scroll-view scroll-y class="scroll-container">
|
||||
|
|
@ -135,7 +153,8 @@
|
|||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onMounted, ref, reactive, computed } from 'vue'
|
||||
import { getBranchListApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi, } from '@/services/materialsStation'
|
||||
import { getBranchListApi,getImpUnitListApi, getDepartListByImpUnitApi, getProListByDepartApi } from '@/services/materialsStation'
|
||||
import { getTypeListApi } from '@/services/inStorage/index.js'
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const userInfo = ref(memberStore.userInfo || {})
|
||||
|
|
@ -147,10 +166,12 @@ const queryParams = ref({
|
|||
departName: '',
|
||||
proName: '',
|
||||
keyWord: '',
|
||||
typeName: ''
|
||||
})
|
||||
const impUnitOptions = ref([])
|
||||
const departOptions = ref([])
|
||||
const proOptions = ref([])
|
||||
const typeList = ref([])
|
||||
|
||||
const back = () => {
|
||||
uni.navigateBack({
|
||||
|
|
@ -204,6 +225,7 @@ onLoad((opt) => {
|
|||
handleImpUnitChange()
|
||||
handleDepartChange()
|
||||
getList()
|
||||
getTypeList()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
|
@ -265,6 +287,23 @@ const handleDepartChange= async () => {
|
|||
}
|
||||
};
|
||||
|
||||
const getTypeList = async () => {
|
||||
try {
|
||||
const res = await getTypeListApi({ level: 3, skipPermission: 1 })
|
||||
console.log('🚀 ~ getTypeList ~ res:', res)
|
||||
typeList.value = []
|
||||
if (res.data) {
|
||||
typeList.value = res.data.map(item => ({
|
||||
text: item.typeName, // 设备类型字段
|
||||
value: item.typeName
|
||||
}))
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getTypeList ~ error:', error)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const filteredEquipmentCategories = computed(() => {
|
||||
|
|
@ -290,7 +329,7 @@ const showDetail= (engineering) => {
|
|||
console.log('查看详情:', engineering);
|
||||
// 这里可以跳转到详情页面或显示弹窗等
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialsStation/equipmentRecord/equipmentRecordDetails?proName='+ engineering.proName,
|
||||
url: '/pages/materialsStation/equipmentRecord/equipmentRecordDetails?proName='+ engineering.proName + '&typeName='+ queryParams.value.typeName,
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ const back = () => {
|
|||
onLoad((options) => {
|
||||
console.log(options)
|
||||
proName.value = options.proName
|
||||
queryParams.value.typeName = options.typeName
|
||||
getDetailsList()
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const userInfo = ref(memberStore.userInfo || {})
|
|||
|
||||
const queryParams = reactive({
|
||||
teamId: '',
|
||||
status: '',
|
||||
status: 2,
|
||||
})
|
||||
const teamList = ref([])
|
||||
const statusList = ref([
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@
|
|||
<uni-easyinput
|
||||
v-model="formData.backPerson"
|
||||
placeholder="请输入内容"
|
||||
disabled
|
||||
></uni-easyinput>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="联系电话" name="phone">
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@
|
|||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<div style="width: 100%">
|
||||
<ElectronicSeal :maCode="codeData?.maCode" :maId="codeData?.maId" :devType="queryParams?.jiJuType" />
|
||||
</div>
|
||||
<!-- <div style="width: 100%">-->
|
||||
<!-- <ElectronicSeal :maCode="codeData?.maCode" :maId="codeData?.maId" :devType="queryParams?.jiJuType" />-->
|
||||
<!-- </div>-->
|
||||
|
||||
<button type="primary" style="margin-top: 20px" @click="addCode">添加编码</button>
|
||||
</view>
|
||||
|
|
@ -106,10 +106,10 @@
|
|||
<script>
|
||||
import { decryptWithSM4 } from '@/utils/sm'
|
||||
import { getInfoByCodeApi } from '@/services/picking/outbound'
|
||||
import ElectronicSeal from '@/components/ElectronicSeal/index.vue'
|
||||
// import ElectronicSeal from '@/components/ElectronicSeal/index.vue'
|
||||
|
||||
export default {
|
||||
components: { ElectronicSeal },
|
||||
// components: { ElectronicSeal },
|
||||
data() {
|
||||
return {
|
||||
showCamera: false,
|
||||
|
|
@ -136,6 +136,8 @@ export default {
|
|||
focusTimeout: null,
|
||||
// 设备信息
|
||||
systemInfo: null,
|
||||
screenHeight: null,
|
||||
screenWidth: null,
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
|
|
@ -205,6 +207,11 @@ export default {
|
|||
const systemInfo = uni.getSystemInfoSync()
|
||||
console.log('设备信息:', systemInfo)
|
||||
this.systemInfo = systemInfo
|
||||
// 获取屏幕高度和宽度
|
||||
const screenHeight = systemInfo.screenHeight; // 屏幕高度:1000
|
||||
const screenWidth = systemInfo.screenWidth; // 屏幕宽度:600
|
||||
this.screenHeight = screenHeight;
|
||||
this.screenWidth = screenWidth;
|
||||
} catch (error) {
|
||||
console.error('获取设备信息失败:', error)
|
||||
}
|
||||
|
|
@ -482,7 +489,7 @@ export default {
|
|||
console.log('拍照前聚焦...')
|
||||
console.log('开始拍照...')
|
||||
CameraPreview.takePicture(
|
||||
{ width: 640, height: 540, quality: 50 },
|
||||
{width:this.screenWidth, height:this.screenHeight, quality: 50 },
|
||||
async (base64PictureData) => {
|
||||
console.log('拍照返回数据', base64PictureData)
|
||||
await this.processImage(base64PictureData)
|
||||
|
|
|
|||
|
|
@ -565,6 +565,8 @@ const changeProd = async (e) => {
|
|||
console.log('🚀 ~ changeProd ~ e:', e)
|
||||
formData.proId = e
|
||||
formData.projectId = prodRange.value.find((item) => item.proId == e)?.projectId
|
||||
formData.teamId = null
|
||||
formData.leasePerson = ''
|
||||
console.log('xxxxxxxxxxxxxxxxxxxxxx', formData.projectId)
|
||||
tableData.value = []
|
||||
if (formData.pickType == 0) {
|
||||
|
|
@ -633,7 +635,7 @@ const getCode = (item) => {
|
|||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/materialsStation/toolsLease/codeOut?params=' +
|
||||
JSON.stringify({ ...item, proId: formData.proId, teamId: formData.teamId }),
|
||||
JSON.stringify({ ...item, proId: formData.proId, teamId: formData.teamId}),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue