| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å¼å¸¸å½å
¥"></page-nav> |
| | | <view class="mainContent" :style="{maxHeight:'1260rpx',overflow: 'scroll'}"> |
| | | |
| | | |
| | | <u-gap height="5" bgColor="#eff0f1"></u-gap> |
| | | |
| | | |
| | | <view class="head marginLeft10 marginRight10" style="padding: 20rpx; 0"> |
| | | |
| | | <view class="flex_column"> |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> 车é´åç§°ï¼ |
| | | </view> |
| | | <view @click='workshopSheetShow = true' class="custominputClass"> |
| | | <view v-show='workshopSheetValue===""' style="color: rgb(192, 196, 204);">è¯·éæ©</view> |
| | | <view v-show='workshopSheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{workshopSheetValue}} |
| | | </view> |
| | | <u-icon :name="!workshopSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> |
| | | 订åç¼å·ï¼ |
| | | </view> |
| | | <view @click='orderSheetShow = true' class="custominputClass"> |
| | | <view v-show='orderSheetValue===""' style="color: rgb(192, 196, 204);">è¯·éæ©</view> |
| | | <view v-show='orderSheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{orderSheetValue}} |
| | | </view> |
| | | <u-icon :name="!orderSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: transparent;margin-right: 6rpx;">*</view> éå®è®¢åï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' disabled |
| | | v-model="saleOrder"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> |
| | | 产ååç§°ï¼ |
| | | </view> |
| | | <view @click='partnameSheetShow = true' class="custominputClass"> |
| | | <view v-show='partnameSheetValue===""' style="color: rgb(192, 196, 204);">è¯·éæ©</view> |
| | | <view v-show='partnameSheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{partnameSheetValue}} |
| | | </view> |
| | | <u-icon :name="!partnameSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: transparent;margin-right: 6rpx;">*</view> è§æ ¼åå·ï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' disabled |
| | | v-model="partdesc"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> è®¢åæ°éï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' disabled |
| | | v-model="order_qty"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> è®¡åæ°éï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' |
| | | v-model="plan_qty"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> 宿æ°éï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' |
| | | v-model="comp_qty"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> å¼å¸¸ççº§ï¼ |
| | | </view> |
| | | <u-radio-group v-model="exceleve"> |
| | | <u-radio shape="circle" label="æ®é" name="R" labelSize="16"></u-radio> |
| | | <u-radio shape="circle" label="严é" style="margin-left: 20rpx;" name="S" labelSize="16"> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> å¼å¸¸äººæ°ï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' |
| | | v-model="excepeople"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> å¼å¸¸æ¶é´ï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' |
| | | v-model="excedate"> |
| | | </u--input> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> å计æ¶é´ï¼ |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请è¾å
¥" :adjustPosition='false' border="surround" type='number' |
| | | v-model="totaltime"> |
| | | </u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: transparent;margin-right: 6rpx;">*</view> å¼å¸¸åå ï¼ |
| | | <view class='inputClass'> |
| | | <u--textarea placeholder="请è¾å
¥" :adjustPosition='false' border="surround" v-model="excedesc"> |
| | | </u--textarea> |
| | | </view> |
| | | </view> |
| | | |
| | | <view style="display: flex;"> |
| | | <view v-for="(pic,index) in fileList" :key="pic.name"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;"> |
| | | <u-icon name="close" color="#fff" size="16" |
| | | style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;" |
| | | @click="deletePic(pic)"></u-icon> |
| | | |
| | | <image :src="pic.uri" @click="imgPreview(pic)" class="upLoadImg"></image> |
| | | </view> |
| | | </view> |
| | | <image v-if="fileList.length<3" src="../../static/img/uploadImg.png" style="width: 100rpx;height: 100rpx;border: 1rpx solid #eff0f1;border-radius: 20rpx; |
| | | margin: 20rpx;padding: 30rpx;" @click="selectPics"> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <!-- :disabled="" --> |
| | | <view class="footer"> |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" text="确认æäº¤"> |
| | | </u-button> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <!-- 车é´åç§° --> |
| | | <u-picker :show="workshopSheetShow" :columns="workshopColumns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='workshopSheetShow=false' @confirm='workshopPickerConfirm' @cancel='workshopSheetShow=false'> |
| | | </u-picker> |
| | | |
| | | <!-- 订åç¼å· --> |
| | | <u-picker :show="orderSheetShow" :columns="orderColumns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='orderSheetShow=false' @confirm='orderPickerConfirm' @cancel='orderSheetShow=false'> |
| | | </u-picker> |
| | | |
| | | <!-- 产ååç§° --> |
| | | <u-picker :show="partnameSheetShow" :columns="partnameColumns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='partnameSheetShow=false' @confirm='partnamePickerConfirm' @cancel='partnameSheetShow=false'> |
| | | </u-picker> |
| | | |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | PrentOrganizationNoCompany, |
| | | WkspWrkOrderDataSelect, |
| | | WrkOrderPartDataSelect |
| | | } from '../../config/api.js'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | workshopSheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | workshopColumns: [], // |
| | | workshopList: [], |
| | | workshopSheetValue: '', |
| | | |
| | | orderSheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | orderColumns: [], // |
| | | orderList: [], |
| | | orderSheetValue: '', |
| | | |
| | | saleOrder: '', //éå®è®¢å |
| | | |
| | | partnameSheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | partnameColumns: [], // |
| | | partnameList: [], |
| | | partnameSheetValue: '', |
| | | |
| | | |
| | | partdesc: '', //è§æ ¼åå· |
| | | order_qty: '', //è®¢åæ°é |
| | | plan_qty: '', //è®¡åæ°é |
| | | comp_qty: '', //宿æ°é |
| | | exceleve: 'R', //å¼å¸¸ç级 |
| | | excepeople: '', //å¼å¸¸äººæ° |
| | | excedate: '', //å¼å¸¸æ¥æ |
| | | totaltime: '', //å计æ¶é´ |
| | | excedesc: '', //å¼å¸¸åå |
| | | |
| | | |
| | | imgPreviewSrcs: [], //å¾çé¢è§src |
| | | fileList: [ |
| | | |
| | | ], |
| | | isDisabledSubmitButton: false |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | |
| | | this.getPrentOrganizationNoCompany() |
| | | }, |
| | | methods: { |
| | | async getPrentOrganizationNoCompany() { |
| | | const res = await PrentOrganizationNoCompany() |
| | | if (res.code === '200') { |
| | | this.workshopList = res.data.map(({ |
| | | torg_code, |
| | | torg_name |
| | | }) => ({ |
| | | code: torg_code, |
| | | name: torg_name |
| | | })) |
| | | this.workshopColumns = [this.workshopList.map(i => i.name)] |
| | | } |
| | | |
| | | }, |
| | | workshopPickerConfirm(val) { |
| | | console.log(val, 11) |
| | | |
| | | this.getWkspWrkOrderDataSelect(this.workshopList.find(i => i.name === val.value[0]).code) |
| | | this.workshopSheetValue = val.value[0] |
| | | this.workshopSheetShow = false |
| | | |
| | | |
| | | this.orderColumns = [] |
| | | this.orderSheetValue = '' |
| | | |
| | | this.partnameColumns = [] |
| | | this.partnameSheetValue = '' |
| | | }, |
| | | |
| | | async getWkspWrkOrderDataSelect(wkshopcode) { |
| | | const res = await WkspWrkOrderDataSelect({ |
| | | wkshopcode |
| | | }) |
| | | |
| | | if (res.code === '200') { |
| | | this.orderList = res.data |
| | | this.orderColumns = [this.orderList.map(i => i.wo)] |
| | | } |
| | | }, |
| | | orderPickerConfirm(val) { |
| | | this.getWrkOrderPartDataSelect(val.value[0]) |
| | | this.saleOrder = this.orderList.find(i => i.wo === val.value[0]).saleOrderCode |
| | | this.orderSheetValue = val.value[0] |
| | | this.orderSheetShow = false |
| | | |
| | | this.partnameColumns = [] |
| | | this.partnameSheetValue = '' |
| | | }, |
| | | async getWrkOrderPartDataSelect(ordercode) { |
| | | const res = await WrkOrderPartDataSelect({ |
| | | ordercode |
| | | }) |
| | | this.partnameList = res.data |
| | | this.partnameColumns = [this.partnameList.map(i => i.partname)] |
| | | }, |
| | | partnamePickerConfirm(val) { |
| | | this.partnameSheetValue = val.value[0] |
| | | this.partnameSheetShow = false |
| | | |
| | | this.partdesc = this.partnameList.find(i => i.partname === val.value[0]).partspec |
| | | this.order_qty = this.partnameList.find(i => i.partname === val.value[0]).qty |
| | | }, |
| | | |
| | | // éæ©å¾ç |
| | | selectPics() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 3, |
| | | success: (res) => { |
| | | const files = res.tempFiles; |
| | | for (let i = 0; i < files.length; i++) { |
| | | let obj = new Object(); |
| | | obj.name = 'photo' + i + new Date().getTime(); |
| | | obj.uri = files[i].path; |
| | | that.fileList.push(obj); |
| | | if (obj.src == null || obj.src == '' || obj.src == undefined) { |
| | | that.imgPreviewSrcs.push(obj.uri) |
| | | } else { |
| | | that.imgPreviewSrcs.push(obj.src) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // é¢è§å¾ç |
| | | imgPreview(img) { |
| | | uni.previewImage({ |
| | | current: this.fileList.findIndex(i => i.name === img.name), |
| | | indicator: "number", |
| | | loop: true, |
| | | urls: this.imgPreviewSrcs |
| | | |
| | | }) |
| | | }, |
| | | |
| | | submit() { |
| | | |
| | | if (this.workshopSheetValue === '') { |
| | | return uni.$u.toast('车é´ä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.orderSheetValue === '') { |
| | | return uni.$u.toast('订åä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.partnameSheetValue === '') { |
| | | return uni.$u.toast('产åä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.order_qty === '') { |
| | | return uni.$u.toast('è®¢åæ°éä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.plan_qty === '') { |
| | | return uni.$u.toast('è®¡åæ°éä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.comp_qty === '') { |
| | | return uni.$u.toast('宿æ°éä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.excepeople === '') { |
| | | return uni.$u.toast('å¼å¸¸äººæ°ä¸è½ä¸ºç©º') |
| | | } |
| | | if (this.totaltime === '') { |
| | | return uni.$u.toast('å计æ¶é´ä¸è½ä¸ºç©º') |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | let formData = { |
| | | opertype: 'Add', |
| | | id: '', |
| | | wkshop_code: this.workshopList.find(i => i.name === this.workshopSheetValue).code, |
| | | order_code: this.orderSheetValue, |
| | | saleorder_code: this.saleOrder, |
| | | partcode: this.partnameList.find(i => i.partname === this.partnameSheetValue).partcode, |
| | | order_qty: this.order_qty, |
| | | plan_qty: this.plan_qty, |
| | | comp_qty: this.comp_qty, |
| | | exceleve: this.exceleve, |
| | | excedesc: this.excedesc, |
| | | excepeople: this.excepeople, |
| | | totaltime: this.totaltime, |
| | | excedate: this.global.handleDatetime2(new Date()) |
| | | } |
| | | |
| | | console.log(JSON.stringify(formData)) |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | // 'Content-Type': 'application/json', |
| | | 'Token': uni.getStorageSync('Token') |
| | | } |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/ExceptionManagement/AddUpdateExceptionManagement', |
| | | files: this.fileList.length === 0 ? [{ |
| | | uri: '/' |
| | | }] : this.fileList, |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | console.log(JSON.stringify(res)) |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.fileList = [] |
| | | this.imgPreviewSrcs = [] |
| | | |
| | | |
| | | this.workshopSheetValue = '' |
| | | this.orderSheetValue = '' |
| | | this.saleOrder = '' |
| | | this.partnameSheetValue = '' |
| | | |
| | | this.partdesc = '' |
| | | this.order_qty = '' |
| | | this.plan_qty = '' |
| | | this.comp_qty = '' |
| | | this.exceleve = 'R' |
| | | this.excepeople = '' |
| | | this.excedate = '' |
| | | this.totaltime = '' |
| | | this.excedesc = '' |
| | | |
| | | this.orderColumns = [] |
| | | this.partnameColumns = [] |
| | | |
| | | |
| | | |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | fail(res) { |
| | | console.log(res) |
| | | uni.$u.toast('æäº¤å¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | }) |
| | | |
| | | // #ifdef APP-PLUS ||MP |
| | | |
| | | // #endif |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 412rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 0 16rpx; |
| | | |
| | | } |
| | | |
| | | .ellipsis { |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .scanImg2 { |
| | | width: 70px; |
| | | height: 70px; |
| | | border-radius: 50%; |
| | | margin: auto; |
| | | background: url('@/static/img/scan.png') no-repeat; |
| | | box-shadow: #436df5 0px 0px 20px; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | ::v-deep .addClass .uicon-plus-circle { |
| | | font-size: 50rpx !important; |
| | | margin-right: 20rpx !important; |
| | | } |
| | | |
| | | ::v-deep .addClass .u-button__text { |
| | | font-size: 46rpx !important; |
| | | } |
| | | |
| | | |
| | | ::v-deep .u-modal__content { |
| | | padding-bottom: 260rpx; |
| | | margin-bottom: 100rpx; |
| | | } |
| | | |
| | | ::v-deep .u-action-sheet { |
| | | max-height: 600rpx !important; |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | ::v-deep .u-checkbox-label--right { |
| | | padding: 30rpx; |
| | | border-bottom: 1rpx solid #eee; |
| | | } |
| | | |
| | | |
| | | |
| | | .badSheetClass { |
| | | position: relative; |
| | | } |
| | | |
| | | .badNumber { |
| | | position: absolute; |
| | | top: 20rpx; |
| | | left: 20rpx; |
| | | font-size: 26rpx; |
| | | color: rgb(0, 102, 255) |
| | | } |
| | | |
| | | .trash { |
| | | position: absolute; |
| | | top: 20rpx; |
| | | right: 30rpx; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .uploader { |
| | | /deep/.u-add-tips { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .uni-progress-bar { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | .upLoadImg { |
| | | width: 160rpx; |
| | | height: 160rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | </style> |