Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
| | |
| | | <span><i class="el-icon-tickets"></i> ç»çæ°æ®</span> |
| | | <span class="list-actions"> |
| | | <el-tag type="primary" size="small">å
± {{ materials.length }} æ¡</el-tag> |
| | | <el-tag type="primary" size="small">å·²ç»ç {{ totalStockCount }}</el-tag> |
| | | <el-tag type="primary" size="small">åºå {{ totalStockSum }}{{ uniqueUnit }}</el-tag> |
| | | <el-tag type="primary" size="small">æªç»ç {{ totalStockCount }}</el-tag> |
| | | <el-tag type="primary" size="small">æªå
¥åºæ°é {{ totalStockSum }}{{ uniqueUnit }}</el-tag> |
| | | <el-tag v-if="trayBarcode" type="success" size="small">æç: {{ trayBarcode }}</el-tag> |
| | | <el-tag v-if="form.locationType" type="info" size="small">åºå: {{ currentLocationDesc }}</el-tag> |
| | | </span> |
| | |
| | | import { ElLoading, ElMessage,ElMessageBox } from 'element-plus'; |
| | | import { ref, onMounted, onUnmounted } from 'vue' |
| | | import InboundOrder from '../../../views/inbound/inboundOrder.vue'; |
| | | import { th } from 'element-plus/es/locales.mjs'; |
| | | |
| | | export default { |
| | | name: 'BarcodeScanner', |
| | |
| | | // æå¨æ£æ¥locationTypeï¼æ£ç¡®å¤çå¼ä¸º0çæ
åµ |
| | | if (this.form.locationType === null || this.form.locationType === undefined || this.form.locationType === '') { |
| | | this.error = '请å
éæ©ä»åºåºå'; |
| | | this.$message.warning('请å
éæ©ä»åºåºå'); |
| | | //this.$message.warning('请å
éæ©ä»åºåºå'); |
| | | } else { |
| | | // 妿å¼åå¨ï¼å
æ¬0ï¼ï¼ä½éªè¯ä¸éè¿ï¼å¯è½æ¯å
¶ä»éªè¯é误 |
| | | this.error = 'è¯·æ£æ¥è¡¨å填忝妿£ç¡®'; |
| | |
| | | // å
ç´æ¥æ£æ¥locationTypeï¼é¿å
表åéªè¯ç弿¥é®é¢ |
| | | if (!this.form.locationType) { |
| | | this.error = '请å
éæ©ä»åºåºå'; |
| | | this.$message.warning('请å
éæ©ä»åºåºå'); |
| | | //this.$message.warning('请å
éæ©ä»åºåºå'); |
| | | return; |
| | | } |
| | | |
| | |
| | | duration: 2000 |
| | | }); |
| | | |
| | | |
| | | this.fetchStockStatistics(); |
| | | // æ¸
ç©ºç©æè¾å
¥æ¡å¹¶ä¿æèç¦ |
| | | this.barcode = ''; |
| | | this.scanCode = ''; // æ¸
空æ«ç ç¼å |
| | |
| | | if(!response.status){ |
| | | this.error = response.message || 'æ¥è¯¢æ¡ç ä¿¡æ¯å¤±è´¥ï¼è¯·éè¯'; |
| | | } |
| | | // ç¡®ä¿è¿åçæ°æ®å
嫿æå¿
éçåæ®µ |
| | | |
| | | return materialData; |
| | | |
| | | } catch (error) { |
| | |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.fetchStockStatistics(); |
| | | |
| | | }).catch(() => { |
| | | // åæ¶å é¤ |
| | | }); |
| | |
| | | value: '空æçåºåº', |
| | | onClick: function () { |
| | | |
| | | // 2. çæ3-12ç«å°é项ï¼é»è®¤ç¬¬ä¸ä¸ªä¸ºç«å°3ï¼ |
| | | |
| | | const platformOptions = Array.from({ length: 1 }, (_, i) => { |
| | | const num = 1; |
| | | return { label: `ç«å°${num}`, value: `1-2` }; |
| | |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // 3. è¡¨åæ°æ®ï¼é»è®¤éä¸ç«å°3ï¼ |
| | | |
| | | const formData = reactive({ |
| | | palletCode: '', |
| | | selectedPlatform: platformOptions[0].value // é»è®¤ç»å®ç«å°3çvalue |
| | | selectedPlatform: platformOptions[0].value |
| | | }); |
| | | |
| | | const vnode = createVNode(ElDialog, { |
| | | title: '空æçåºåº', |
| | | width: '500px', // å¾®è°å®½åº¦æ´åè° |
| | | width: '500px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | |
| | | } |
| | | }, |
| | | style: { |
| | | padding: '20px 0', // å¼¹çªå
ä¸ä¸çç½ï¼é¿å
å
å®¹ç´§è´´è¾¹æ¡ |
| | | borderRadius: '8px' // 轻微åè§ï¼æåè´¨æ |
| | | padding: '20px 0', |
| | | borderRadius: '8px' |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | |
| | | ] |
| | | }, |
| | | ref: 'batchOutForm', |
| | | labelWidth: '100px', // åºå®æ ç¾å®½åº¦ï¼ç¡®ä¿å¯¹é½ |
| | | labelWidth: '100px', |
| | | style: { |
| | | padding: '0 30px', // 表åå·¦å³çç½ï¼å¢å å¼å¸æ |
| | | padding: '0 30px', |
| | | } |
| | | }, [ |
| | | // åºåºç«å°ï¼ä¸ï¼ä¼åæ ·å¼ï¼ |
| | | |
| | | h(ElFormItem, { |
| | | label: 'åºåºç«å°', |
| | | prop: 'selectedPlatform', |
| | | style: { |
| | | marginBottom: '24px' // 表å项é´è·ä¼å |
| | | marginBottom: '24px' |
| | | } |
| | | }, [ |
| | | h(ElSelect, { |
| | | placeholder: 'è¯·éæ©åºåºç«å°ï¼3-12ï¼', |
| | | placeholder: 'è¯·éæ©åºåºç«å°', |
| | | modelValue: formData.selectedPlatform, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.selectedPlatform = val; |
| | | }, |
| | | style: { |
| | | width: '100%', |
| | | height: '40px', // ç»ä¸ç»ä»¶é«åº¦ |
| | | height: '40px', |
| | | borderRadius: '4px', |
| | | borderColor: '#dcdfe6' |
| | | } |
| | |
| | | h(ElOption, { label: platform.label, value: platform.value }) |
| | | )) |
| | | ]), |
| | | // æçç¼å·ï¼ä¸ï¼ä¼åæ ·å¼ï¼ |
| | | |
| | | h(ElFormItem, { |
| | | label: 'æç®±å·', |
| | | prop: 'palletCode', |
| | | style: { |
| | | marginBottom: '16px' // 䏿é®åºæå¼åçé´è· |
| | | marginBottom: '16px' |
| | | } |
| | | }, [ |
| | | h(ElInput, { |
| | |
| | | }, |
| | | style: { |
| | | width: '100%', |
| | | height: '40px', // ä¸éæ©å¨é«åº¦ç»ä¸ |
| | | height: '40px', |
| | | borderRadius: '4px', |
| | | borderColor: '#dcdfe6' |
| | | }, |
| | | attrs: { |
| | | placeholderStyle: 'color: #909399;' // å 使åé¢è²ä¼åï¼æ´æå |
| | | placeholderStyle: 'color: #909399;' |
| | | } |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åºï¼æ ·å¼ä¼åï¼ |
| | | |
| | | h('div', { |
| | | style: { |
| | | textAlign: 'right', |
| | | marginTop: '8px', |
| | | paddingRight: '4px' // æé®ä¸å³ä¾§å¯¹é½å¾®è° |
| | | paddingRight: '4px' |
| | | } |
| | | }, [ |
| | | h(ElButton, { |
| | |
| | | }, |
| | | style: { |
| | | marginRight: '8px', |
| | | color: '#606266' // åæ¶æé®é¢è²ä¼å |
| | | color: '#606266' |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | |
| | | |
| | | }).then(({ data, status, message }) => { |
| | | if (status) { |
| | | ElMessage.success(`åºåºæåï¼åé
çæçç¼å·ï¼${data.palletCode || formData.palletCode}`); |
| | | |
| | | ElMessage.success(`åºåºæå`); |
| | | this.refresh(); |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | |
| | | }, |
| | | style: { |
| | | borderRadius: '4px', |
| | | padding: '8px 20px' // æé®å
è¾¹è·ä¼åï¼ç¹å»åºåæ´èé |
| | | padding: '8px 20px' |
| | | } |
| | | }, 'ç¡®å®') |
| | | ]) |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | buttons: { view: [ |
| | | { |
| | | name: 'éä¸ä»»å¡', |
| | | type: 'primary', |
| | | value: 'éä¸ä»»å¡', |
| | | onClick: async function () { |
| | | const selectRows = this.$refs.table.getSelected(); |
| | | if (selectRows.length == 0) return ElMessage.warning('è¯·éæ©ä¸æ¡ä»»å¡'); |
| | | if (selectRows.length > 1) return ElMessage.warning('åªè½éæ©ä¸æ¡ä»»å¡'); |
| | | const taskNum = selectRows[0].taskId; |
| | | try{ |
| | | const response = await http.post('api/Task/RecreateTasks?taskNums='+taskNum, 'ä»»å¡éä¸ä¸...'); |
| | | const { status, message ,data} = response; |
| | | if (status) { |
| | | ElMessage.success(`éä¸ä»»å¡æå`); |
| | | this.refresh(); |
| | | }else{ |
| | | ElMessage.error(`éä¸ä»»å¡å¤±è´¥ï¼${message}`); |
| | | } |
| | | }catch(err){ |
| | | ElMessage.error(`éä¸ä»»å¡å¼å¸¸ï¼${err.message}`); |
| | | } |
| | | } |
| | | } |
| | | ], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | |
| | | bind: { key: "inOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "businessType", |
| | | title: "ä¸å¡ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "businessType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderStatus", |
| | | title: "åæ®ç¶æ", |
| | | type: "decimal", |
| | |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "warehouseCode", |
| | | title: "ä»åºå·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true |
| | | }, |
| | | { |
| | | field: "barcode", |
| | | title: "æ¡ç ", |
| | | type: "decimal", |
| | |
| | | bind: { key: "outOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "businessType", |
| | | title: "ä¸å¡ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "businessType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderStatus", |
| | | title: "åæ®ç¶æ", |
| | | type: "decimal", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | field: "palletType", |
| | | title: "æçç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "palletType", data: [] }, |
| | | }, |
| | | // { |
| | | // field: "isFull", |
| | | // title: "æ¯å¦æ»¡ç", |
| | | // type: "string", |
| | | // width: 150, |
| | | // align: "left", |
| | | // bind: { key: "yesno", data: [] }, |
| | | // }, |
| | | { |
| | | field: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |