| | |
| | | "navigationBarTitleText": "æ£éªè¯¦æ
",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/equipmentInspection/equipmentInspection",
|
| | | "style": {
|
| | | "navigationBarTitleText": "设å¤å·¡æ£",
|
| | | "enablePullDownRefresh": false
|
| | | }
|
| | | }
|
| | | ]
|
| | | }
|
| | |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: 'åé
æå', icon: 'success', duration: 2000, mask: true }); |
| | | setTimeout(() => { |
| | | uni.$emit('update', { msg:'å·æ°å表' }) |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, 2000) |
| | | } |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .u-icon__icon { |
| | | margin-right: 0 !important; |
| | | } |
| | | .fp_list_item_right_dis { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .black { |
| | | color: black !important; |
| | | } |
| | | input { |
| | | width: 180rpx; |
| | | height: 60rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #E5E5E5; |
| | | padding: 0 30rpx; |
| | | text-align: right; |
| | | font-size: 25rpx; |
| | | } |
| | | // input { |
| | | // width: 180rpx; |
| | | // height: 60rpx; |
| | | // border-radius: 8rpx; |
| | | // border: 2rpx solid #E5E5E5; |
| | | // padding: 0 30rpx; |
| | | // text-align: right; |
| | | // font-size: 25rpx; |
| | | // } |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | |
| | | font-weight: 400; |
| | | } |
| | | } |
| | | .fp_list_item_right { |
| | | .fp_list_item_right::v-deep { |
| | | display: flex; |
| | | align-items: center; |
| | | .u-icon__icon { |
| | | margin-right: 0 !important; |
| | | } |
| | | .wu { |
| | | text-align: center; |
| | | text { |
| | |
| | | .black { |
| | | color: black !important; |
| | | } |
| | | input { |
| | | width: 180rpx; |
| | | height: 60rpx; |
| | | border-radius: 8rpx; |
| | | border: 1rpx solid #E5E5E5; |
| | | padding: 0 30rpx; |
| | | text-align: right; |
| | | font-size: 25rpx; |
| | | } |
| | | // input { |
| | | // width: 180rpx; |
| | | // height: 60rpx; |
| | | // border-radius: 8rpx; |
| | | // border: 1rpx solid #E5E5E5; |
| | | // padding: 0 30rpx; |
| | | // text-align: right; |
| | | // font-size: 25rpx; |
| | | // } |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | |
| | | <!-- {{$store.state.statusbarHeight}} -->
|
| | |
|
| | | <u-sticky>
|
| | | <view class="plr50 pb30 nav-style">
|
| | | <view class="plr30 pb30 nav-style">
|
| | | <view
|
| | | :style="{paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
|
| | | :style="{background: '#fff', zIndex: '999', paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
|
| | | å¾
å</view>
|
| | | <view class="cY">
|
| | | <u-search placeholder="æç´¢å
³é®å" bgColor="#f7f7f7" :showAction="false" @search="search"
|
| | |
| | | <view>
|
| | | <div class="box">
|
| | | <div class="box_info" :style="{background: 'url(' + img + ')'}">
|
| | | <image :src="userInfo.avatar ? userInfo.avatar : avatar" mode="widthFix" />
|
| | | <image :src="avatar" mode="widthFix" />
|
| | | <div class="box_info_box">
|
| | | <text>{{userInfo.realname}}</text>
|
| | | <div class="box_info_box_x" @click="switchOrganization">
|
| | |
| | | }, |
| | | onLoad() { |
| | | this.getLists() |
| | | uni.$on('update', (data) => { |
| | | this.isLoading = true |
| | | this.search.page = 0 |
| | | this.list = [] |
| | | this.finished = false |
| | | this.getLists() |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 䏿巿° |
| | |
| | | // ç¹å»å½å项 |
| | | clickItem(i) { |
| | | this.list.forEach((item, index) => { |
| | | item.isActive = i === index; |
| | | if (i === index) { |
| | | item.isActive = !item.isActive |
| | | } |
| | | }) |
| | | }, |
| | | // æç´¢ |
| | |
| | | return |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.workorderDistributNum ? data.num - data.workorderDistributNum : data.num}` |
| | | url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.num - data.workorderDistributNum - data.distributNoDoneNum}` |
| | | }); |
| | | }, |
| | | // è·åå½åç¨æ·æåé
çå·¥åº |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- éæ©æ¥æ --> |
| | | <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm"></u-calendar> |
| | | <!-- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // æ¥æç¡®å® |
| | | timeConfirm(val) { |
| | | this.listData.startDate = val[0] |
| | | this.listData.endDate = val[val.length - 1] |
| | | this.listData.startDate = val.startDate |
| | | this.listData.endDate = val.endDate |
| | | this.timeShow = false |
| | | }, |
| | | // 忢工å |
| | |
| | | }, |
| | | // ç¹å»æ ç¾æç´¢ |
| | | clickTag(ids) { |
| | | this.listData.cateIds = ids |
| | | // ids ? ids.split(',') : [] |
| | | this.listData.cateIds = ids ? ids.split(',') : [] |
| | | this.listData.page = 0 |
| | | this.finished = false |
| | | this.lists = [] |
| | |
| | | endDate: this.listData.endDate, |
| | | procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [], |
| | | factoryId: this.listData.departIds, |
| | | statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : [] |
| | | statusList: this.listData.cateIds |
| | | // this.listData.cateIds ? this.listData.cateIds.split(',') : [] |
| | | }, |
| | | page: this.listData.page, |
| | | sorts: [ |
| | |
| | | </view> --> |
| | | <view class="fixedBottom bottom cY"> |
| | | <view class="fx1 bbox plr30"> |
| | | <u-checkbox-group style="display: block;" name="" @change="selectAll()"> |
| | | <u-checkbox :checked="isAll" label="å
¨é"></u-checkbox> |
| | | <u-checkbox-group v-model="isAll" style="display: block;" @change="selectAll()"> |
| | | <u-checkbox label="å
¨é" name="all"></u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | <view class="submit sbtn_green bbox tc" @click="submitAction">{{ `æäº¤(${totalNum})`}}</view> |
| | |
| | | loading: false, |
| | | finished: false, |
| | | refreshing: false, |
| | | isAll: false, |
| | | total: 0 |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.isAll = false |
| | | this.show = true |
| | | this.refreshing = false |
| | | this.finished = false |
| | |
| | | this.pages.page = 1 |
| | | this.loadData() |
| | | }, |
| | | selectAll() { |
| | | selectAll(e) { |
| | | console.log(e) |
| | | console.log(this.isAll) |
| | | this.list.forEach(element => { |
| | | element.isActive = this.all |
| | | element.isActive = e.length > 0 ? true : false |
| | | }) |
| | | }, |
| | | submitAction () { |
| | |
| | | <view class="content"> |
| | | <view class="content_search"> |
| | | <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" |
| | | placeholder="æç´¢ä»åºåç§°/ç©æåç§°"> |
| | | placeholder="æç´¢ä»åºåç§°/ç©æç¼ç "> |
| | | <template v-slot:content> |
| | | <view class="Search_item"> |
| | | <view class="Search_item_label">æ±æ»ä¾æ®</view> |
| | |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">æ¹æ¬¡å·ï¼</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.batch }} |
| | | {{ item.batch ? item.batch : '-' }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- éæ©æ¥æ --> |
| | | <u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false" |
| | | @confirm="timeConfirm"></u-calendar> |
| | | <!-- <u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false" |
| | | @confirm="timeConfirm"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // æ¥æç¡®å® |
| | | timeConfirm(val) { |
| | | this.listData.planDateEnd = val[val.length - 1] |
| | | this.listData.planDateStart = val[0] |
| | | this.listData.planDateEnd = val.endDate |
| | | this.listData.planDateStart = val.startDate |
| | | this.timeShow = false |
| | | }, |
| | | // åæ¢å·¥åº |
| | |
| | | <view class="bg"> |
| | | <view class="bg_plan" @click="selectPlan"> |
| | | <view class="bg_plan_label" v-if="!from.processPlan"> |
| | | <text><b>*</b>å·¥åºç产计å</text> |
| | | <text><text>*</text>å·¥åºç产计å</text> |
| | | </view> |
| | | <view class="bg_plan_nr" v-else> |
| | | <text>{{ from.processPlan.materialName }} | {{ from.processPlan.materialCode }} | {{ from.processPlan.produceName }}</text> |
| | |
| | | <view class="bg_list_item_h"> |
| | | <view class="bg_list_item_num"> |
| | | <view class="bg_list_item_num_item"> |
| | | <text><b>*</b>è¯åæ°</text> |
| | | <text><text>*</text>è¯åæ°</text> |
| | | <view class="bg_list_item_num_item_sr"> |
| | | <u--input |
| | | placeholder="请è¾å
¥" |
| | |
| | | </view> |
| | | <view class="bg_list_item_num" v-if="from.undesirable > 0"> |
| | | <view class="bg_list_item_num_item" @click="openBL"> |
| | | <text><b>*</b>ä¸è¯é¡¹</text> |
| | | <!-- <text>*</text> --> |
| | | <text>ä¸è¯é¡¹</text> |
| | | <view class="bg_list_item_num_item_sr"> |
| | | <text class="wulll" :style="{color: from.defectiveName ? '#305ED5' : ''}">{{from.defectiveName ? from.defectiveName : '设置'}}</text> |
| | | <image src="@/static/ic_ar@2x.png" alt="" /> |
| | |
| | | <image src="@/static/ic_ar@2x.png" alt="" /> |
| | | </view> |
| | | </view> |
| | | <view class="bg_list_item" v-if="arrType && arrType.length > 0"> |
| | | <view class="bg_list_item" v-if="arrType && arrType.length > 0 && from.duration > 0"> |
| | | <view class="bg_list_item_top"> |
| | | <view class="bg_list_item_top_left"> |
| | | <view class="bg_list_item_top_left_x"></view> |
| | |
| | | processPlan: null, |
| | | deviceId: '', |
| | | deviceName: '', |
| | | // userId: store.state.userInfo.id, |
| | | // userId: userInfo.id, |
| | | userId: '', |
| | | // userName: store.state.userInfo.companyUser.name, |
| | | // userName: userInfo.companyUser.name, |
| | | userName: '', |
| | | qualified: '', // è¯åæ° |
| | | undesirable: '', // ä¸è¯æ° |
| | |
| | | } |
| | | }, |
| | | onReady() { |
| | | let timer = setInterval(() => { |
| | | if (this.userInfo) { |
| | | this.from.userId = this.userInfo.id |
| | | this.form.userName = this.userInfo.realname |
| | | this.from.userName = this.userInfo.realname |
| | | clearInterval(timer) |
| | | } |
| | | }, 500) |
| | | }, |
| | | onLoad() { |
| | | let arr = [] |
| | |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | b { |
| | | text { |
| | | color: red; |
| | | } |
| | | } |
| | |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | b { |
| | | text { |
| | | font-size: 30rpx; |
| | | color: red; |
| | | color: red !important; |
| | | margin-right: 5rpx; |
| | | } |
| | | .warning { |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- éæ©æ¥æ --> |
| | | <u-calendar |
| | | <!-- <u-calendar |
| | | :show="timeShow" |
| | | mode="range" |
| | | @close="timeShow = false" |
| | | :minDate="minDate" |
| | | :maxDate="maxDate" |
| | | @confirm="timeConfirm"></u-calendar> |
| | | @confirm="timeConfirm"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | |
| | | // æ¥æç¡®å® |
| | | timeConfirm(val) { |
| | | this.listData.outPlanDateStart = val[0] |
| | | this.listData.outPlanDateEnd = val[val.length - 1] |
| | | this.listData.outPlanDateStart = val.startDate |
| | | this.listData.outPlanDateEnd = val.endDate |
| | | this.timeShow = false |
| | | }, |
| | | // 忢工å |
| | |
| | | <view class="content_list_item_content_item"> |
| | | <view class="content_list_item_content_item_label">æ¹æ¬¡å·ï¼</view> |
| | | <view class="content_list_item_content_item_nr"> |
| | | {{ item.batch }} |
| | | {{ item.batch ? item.batch : '-' }} |
| | | </view> |
| | | </view> |
| | | <view class="content_list_item_content_item"> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | id: null, |
| | | types: [{ |
| | | name: 'å
¨é¨', |
| | | id: '', |
| | |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id |
| | | wTransferExtDetail(option.id) |
| | | .then(res => { |
| | | this.data = res.data |
| | |
| | | if (this.data.status === 0) { // åºåº |
| | | console.log('åºåº') |
| | | // router.push({ name: 'issueOperation', query: { id: route.query.id, type: 7 } }) |
| | | uni.navigateTo({ |
| | | url: `/pages/OutOperation/OutOperation?id=${this.id}&type=7` |
| | | }); |
| | | } else if (this.data.status === 1) { // å
¥åº |
| | | if (this.data.type === 3) { // å¤æç¡®è®¤ |
| | | console.log('å¤æç¡®è®¤') |
| | |
| | | return |
| | | } |
| | | console.log('å
¥åº') |
| | | uni.navigateTo({ |
| | | url: `/pages/InOperation/InOperation?id=${this.id}&type=7` |
| | | }); |
| | | // router.push({ name: 'warehousing', query: { id: route.query.id, type: 7 } }) |
| | | } |
| | | }, |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- éæ©æ¥æ --> |
| | | <u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false" |
| | | @confirm="timeConfirm"></u-calendar> |
| | | <!-- <u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false" |
| | | @confirm="timeConfirm"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // æ¥æç¡®å® |
| | | timeConfirm(val) { |
| | | this.listData.planDateStart = val[0] |
| | | this.listData.planDateEnd = val[val.length - 1] |
| | | this.listData.planDateStart = val.startDate |
| | | this.listData.planDateEnd = val.endDate |
| | | this.timeShow = false |
| | | }, |
| | | // åæ¢åæ®ç±»å |
| | |
| | | </scroll-view> |
| | | </view> |
| | | <!-- éæ©æ¥æ --> |
| | | <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> |
| | | <!-- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // æ¥æç¡®å® |
| | | timeConfirm(val) { |
| | | this.pageData.checkStartDate = val[0] |
| | | this.pageData.checkEndDate = val[val.length - 1] |
| | | this.pageData.checkStartDate = val.startDate |
| | | this.pageData.checkEndDate = val.endDate |
| | | this.timeShow = false |
| | | }, |
| | | // 忢æ£ç±»å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="box1"> |
| | | <!-- 设å¤+æ¥æ --> |
| | | <view class="box_list"> |
| | | <view class="box_list_item" @click="open"> |
| | | <view class="box_list_item_left"> |
| | | <text>æ£éªè®¾å¤</text><text>*</text> |
| | | </view> |
| | | <view class="box_list_item_right"> |
| | | <text :style="form.equipmentName ? 'color: #000' : ''">{{ form.equipmentName ? form.equipmentName : 'ç¹å»éæ©å·¡æ£è®¾å¤' }}</text> |
| | | <u-icon name="arrow-right" color="#999999" size="18"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="box_list_code" @click.stop="openCode"> |
| | | <view class="boxs"> |
| | | <image src="@/static/jianyan_ic_saoma@2x.png" alt="" /> |
| | | <text>æ«æè®¾å¤</text> |
| | | </view> |
| | | </view> |
| | | <view class="box_list_item" @click="showTime = true"> |
| | | <view class="box_list_item_left"> |
| | | <text>å·¡æ£æ¶é´</text><text>*</text> |
| | | </view> |
| | | <view class="box_list_item_right"> |
| | | <text class="black">{{form.time}}</text> |
| | | <u-icon name="arrow-right" color="#999999" size="18"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- ç¶æ+å¾ç/è§é¢ --> |
| | | <view class="box_list1"> |
| | | <view class="box_list1_item"> |
| | | <view class="box_list1_item_left"> |
| | | <text>设å¤ç¶æ</text><text>*</text> |
| | | </view> |
| | | <view class="box_list1_item_right"> |
| | | <view class="box_list1_item_right_item" :class="{'active': item.active}" |
| | | v-for="(item, index) in status" :key="index" @click="changeItem(index, item.id)">{{item.name}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="box_list1_club"> |
| | | <view class="box_list1_club_label">å·¡æ£ç°åºç
§ç<text v-show="form.status == '1'">*</text></view> |
| | | <view class="box_list1_club_list"> |
| | | <view class="box_list1_club_list_item" @click="uploadFile"> |
| | | <view class="type"> |
| | | <image class="type_img" src="@/static/btn_upload@2x.png" alt="" /> |
| | | </view> |
| | | </view> |
| | | <view class="box_list1_club_list_item" v-for="(item, index) in form.files" :key="index" |
| | | @click="seeBigFile(index)"> |
| | | <image class="close" src="@/static/ic_delete@2x.png" @click.stop="dele(index)" /> |
| | | <image class="play" src="@/static/ic_play@2x.png" v-if="item.type === 1" /> |
| | | <view class="type"> |
| | | <video :src="item.url" v-if="item.type === 1"></video> |
| | | <image v-else class="type_img" :src="item.url" mode="widthFix" /> |
| | | </view> |
| | | </view> |
| | | <view class="box_list1_club_list_item1"></view> |
| | | <view class="box_list1_club_list_item1"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="box_list2"> |
| | | <view class="box_list2_label">夿³¨</view> |
| | | <textarea name="" id="" v-model="form.remarks" cols="20" rows="5" maxlength="300" |
| | | placeholder="è¯·è¯¦ç»æè¿°å·¡æ£æ
åµ"></textarea> |
| | | </view> |
| | | <view class="box_footer"> |
| | | <button class="box_footer_submit" v-preventReClick @click="submit">æäº¤</button> |
| | | </view> |
| | | <!-- éæ©æ¶é´ --> |
| | | <u-datetime-picker :show="showTime" v-model="currentDate" @cancel="showTime = false" @confirm="queding" mode="datetime"></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getBarcodeContent } from '@/util/api/WorkOrderAPI' |
| | | import { saveBean, getDeviceByCondition, getsbInfo } from '@/util/api/QualityAPI' |
| | | import { queryListByCode, uploadFiles } from '@/util/api/index' |
| | | import { QRCodeType, baseUrl } from '@/common/config.js' |
| | | import { setTime, judgmentType } from '@/util/utils.js' |
| | | import { mapState } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | status: [{ |
| | | name: 'æ£å¸¸', |
| | | active: true, |
| | | id: '0' |
| | | }, |
| | | { |
| | | name: 'å¼å¸¸', |
| | | active: false, |
| | | id: '1' |
| | | } |
| | | ], |
| | | columns: [], |
| | | path: '', |
| | | showTime: false, |
| | | currentDate: new Date(), |
| | | form: { |
| | | equipmentId: '', // 设å¤id |
| | | equipmentName: '', //设å¤åç§° |
| | | time: '', // å·¡æ£æ¶é´ |
| | | status: '0', // 设å¤ç¶æ |
| | | files: [], // å·¡æ£å¾ç/è§é¢ |
| | | remarks: '' // 夿³¨ |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.form.time = setTime(new Date(), '-') |
| | | this.getqueryListByCode() |
| | | }, |
| | | computed: { |
| | | ...mapState(['session']) |
| | | }, |
| | | methods: { |
| | | // ç¡®è®¤éæ©æ¥æ |
| | | queding(val) { |
| | | this.form.time = uni.$u.timeFormat(val.value, 'yyyy-mm-dd hh:MM:ss') |
| | | this.showTime = false |
| | | }, |
| | | // æ«ç |
| | | openCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: function (result) { |
| | | getBarcodeContent({ |
| | | barcode: result.result |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | if (res.data.barcodeType === QRCodeType.SB) { |
| | | getsbInfo(res.data.id) |
| | | .then(res1 => { |
| | | if (res1.code === 200) { |
| | | this.form.equipmentId = res1.data.id |
| | | this.form.equipmentName = res1.data.name |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'è¯·æ«ææ£ç¡®ç设å¤ç ', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | // æ¹åç¶æ |
| | | changeItem(i, id) { |
| | | this.status.forEach((item, index) => { |
| | | item.active = index === i; |
| | | }) |
| | | this.form.status = id |
| | | }, |
| | | submit() { |
| | | if (!this.form.equipmentId) return uni.showToast({ |
| | | title: '设å¤ä¸è½ä¸ºç©º', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | if (!this.form.time) return uni.showToast({ |
| | | title: 'æ¶é´ä¸è½ä¸ºç©º', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | if (!this.form.status) return uni.showToast({ |
| | | title: 'ç¶æä¸è½ä¸ºç©º', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | if (this.form.status == '1') { |
| | | if (this.form.files.length === 0) return uni.showToast({ |
| | | title: 'ç°åºç
§çä¸è½ä¸ºç©º', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | saveBean({ |
| | | checkDate: this.form.time, |
| | | content: this.form.remarks, |
| | | deviceId: this.form.equipmentId, |
| | | status: this.form.status, |
| | | multiFilesSaveBeans: this.form.files |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success', |
| | | duration: 2000, |
| | | mask: true |
| | | }); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, 2000) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åå½åç¨æ·ä¸ææè®¾å¤ |
| | | getSB() { |
| | | getDeviceByCondition({}) |
| | | .then(res => { |
| | | if (res.code === 200 && res.data && res.data.length > 0) { |
| | | this.columns = [] |
| | | res.data.forEach(item => { |
| | | this.columns.push({ text: item.name, id: item.id }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åæä»¶ |
| | | async upFile(e) { |
| | | if (this.form.files.length + e.target.files.length > 9) { |
| | | uni.showToast({ |
| | | title: 'æå¤åªè½ä¸ä¼ 9个å¾ç/è§é¢', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | return |
| | | } |
| | | for (let i = 0; i < e.target.files.length; i++) { |
| | | let type = e.target.files[i].type |
| | | let index = type.indexOf('/') |
| | | let data = type.substring(index + 1, type.length) |
| | | const format = new FormData() |
| | | format.append('file', e.target.files[i]) |
| | | format.append('folder', this.path) |
| | | let res = await uploadFiles(format) |
| | | if (res.code === 200) { |
| | | form.files.push({ |
| | | fileUrl: res.data.imgaddr, |
| | | filename: res.data.imgname, |
| | | filesize: e.target.files[i].size, |
| | | type: judgmentType(data.toLowerCase()) ? 0 : 1, |
| | | url: res.data.url |
| | | }) |
| | | } |
| | | } |
| | | // upload.value.value = '' |
| | | }, |
| | | // ç¹å»ä¸ä¼ |
| | | uploadFile() { |
| | | uni.chooseImage({ |
| | | success: (chooseImageRes) => { |
| | | const tempFilePaths = chooseImageRes.tempFilePaths; |
| | | console.log(tempFilePaths) |
| | | uni.uploadFile({ |
| | | url: baseUrl + '/ext/routeCardExt/upload', |
| | | filePath: tempFilePaths[0], |
| | | name: 'file', |
| | | header: { |
| | | 'Cookie': 'eva-auth-token=' + this.session |
| | | }, |
| | | formData: { |
| | | 'folder': this.path |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data)); |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | this.form.files.push({ |
| | | fileUrl: res.data.imgaddr, |
| | | filename: res.data.imgname, |
| | | // filesize: e.target.files[i].size, |
| | | type: judgmentType(tempFilePaths[0]) ? 0 : 1, |
| | | url: res.data.url |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // è·ååå
¸çº¸ |
| | | getqueryListByCode() { |
| | | queryListByCode({ |
| | | dicCode: 'FOLDER', |
| | | label: 'DEVICE_CHECK' |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.path = res.data[0].code |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .box1 { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | background: #F7F7F7; |
| | | |
| | | .box_list { |
| | | padding: 0 30rpx 0 30rpx; |
| | | background: white; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .box_list_code { |
| | | margin: 20rpx 0; |
| | | |
| | | .boxs { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 12rpx; |
| | | } |
| | | |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: $nav-color; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list_item { |
| | | height: 98rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | |
| | | &:last-child { |
| | | border: none; |
| | | } |
| | | |
| | | .box_list_item_left { |
| | | text { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | |
| | | &:first-child { |
| | | color: #222222; |
| | | } |
| | | |
| | | &:last-child { |
| | | color: #DE5243; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list_item_right { |
| | | display: flex; |
| | | align-items: center; |
| | | .black { |
| | | color: black; |
| | | } |
| | | |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | margin-right: 10rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list1 { |
| | | padding: 30rpx; |
| | | background: white; |
| | | margin-top: 20rpx; |
| | | |
| | | .box_list1_item { |
| | | height: 98rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | |
| | | &:last-child { |
| | | border: none; |
| | | } |
| | | |
| | | .box_list1_item_left { |
| | | text { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | |
| | | &:last-child { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #DE5243; |
| | | margin-left: 4rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list1_item_right { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .active { |
| | | color: white !important; |
| | | background: $nav-color !important; |
| | | } |
| | | |
| | | .box_list1_item_right_item { |
| | | padding: 18rpx 32rpx; |
| | | background: #F2F2F2; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin-left: 20rpx; |
| | | border-radius: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list1_club { |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-top: 36rpx; |
| | | |
| | | .box_list1_club_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 32rpx; |
| | | |
| | | text { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #DE5243; |
| | | margin-left: 4rpx; |
| | | } |
| | | } |
| | | |
| | | .box_list1_club_list { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | |
| | | .box_list1_club_list_item1 { |
| | | width: 170rpx; |
| | | height: 0; |
| | | } |
| | | |
| | | .box_list1_club_list_item { |
| | | width: 150rpx; |
| | | height: 150rpx; |
| | | border-radius: 8rpx; |
| | | position: relative; |
| | | margin-right: 22rpx; |
| | | margin-bottom: 22rpx; |
| | | |
| | | .type { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | |
| | | .type_img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | video { |
| | | height: 100%; |
| | | z-index: 1; |
| | | } |
| | | } |
| | | |
| | | .play { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | width: 56rpx; |
| | | height: 56rpx; |
| | | z-index: 9; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .close { |
| | | position: absolute; |
| | | right: -16rpx; |
| | | top: -16rpx; |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | z-index: 9; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .box_list2 { |
| | | padding: 30rpx; |
| | | background: white; |
| | | margin-top: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .box_list2_label { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | textarea { |
| | | border: none; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | textarea::-webkit-input-placeholder { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #B2B2B2; |
| | | } |
| | | } |
| | | |
| | | .box_footer { |
| | | width: 100%; |
| | | padding: 0 30rpx 68rpx 30rpx; |
| | | box-sizing: border-box; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | background: #F7F7F7; |
| | | |
| | | .box_footer_submit { |
| | | width: 100%; |
| | | height: 88rpx; |
| | | background: #4275FC; |
| | | box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.0800); |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | color: #FFFFFF; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | |
| | | // æ ¹æ®IDæ¥è¯¢ |
| | | export function getBYid (id) { |
| | | return request.post(`/ext/workorderCheckExt/${id}`) |
| | | return request.get(`/ext/workorderCheckExt/${id}`) |
| | | } |
| | | // export function getBYid(id: any): Promise<any> { |
| | | // return httpRequest({ |
| | |
| | | export function getOrganization(data) { |
| | | return http.post('/ext/departmentExt/getDepartmentListByConditon', data) |
| | | } |
| | | |
| | | // è·åä¸ä¼ åå
¸å¼ |
| | | export function queryListByCode(params) { |
| | | return http.get('/system/dictData/queryListByCode', {params}) |
| | | } |
| | |
| | | number: /^\d+(?:\.\d{1,4})?$/ |
| | | } |
| | | |
| | | export { gsdate, setTime, setTimeO, REGULAR } |
| | | /*** |
| | | * |
| | | * @param type æä»¶ç±»å |
| | | */ |
| | | function judgmentType (type) { |
| | | let arr = ['jpg', 'jpeg', 'png'] |
| | | // arr.includes(type) |
| | | let open = false |
| | | arr.forEach(item => { |
| | | if (type === item) { |
| | | open = true |
| | | } |
| | | }) |
| | | return open; |
| | | } |
| | | |
| | | export { gsdate, setTime, setTimeO, REGULAR, judgmentType } |