| src/api/kanbanManager.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/permission.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/router/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/kb/procure.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/kb/produce.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/kb/warehouse.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/kanbanManager.js
@@ -1,38 +1,6 @@ import request from '@/utils/request' // å鸣ä»åºçæ¿å·¦ä¸,çäº§å¾ å ¥åº export function ProductionStockedInLeftTop() { return request({ url: 'KanBanManagerent/ProductionStockedInLeftTop', method: 'get' }) } // å鸣ä»åºçæ¿å·¦ä¸,产åå¾ åè´§ export function ProductConsignmentLeftBottom() { return request({ url: 'KanBanManagerent/ProductConsignmentLeftBottom', method: 'get' }) } // å鸣ä»åºçæ¿å³ä¸,è¿ä¸å¨çäº§å¾ å ¥åºäº§åæè¡TOP5 export function ProductionStockedInRightTop() { return request({ url: 'KanBanManagerent/ProductionStockedInRightTop', method: 'get' }) } // å鸣ä»åºçæ¿å³ä¸,è¿ä¸å¨éå®å¾ å货产åæè¡TOP5 export function ProductionStockedInRightBottom() { return request({ url: 'KanBanManagerent/ProductionStockedInRightBottom', method: 'get' }) } // å鸣éè´å§å¤çæ¿å·¦ä¸,éè´å¾ å ¥åº // å£éä»åºçæ¿å·¦ä¸,éè´å¾ å ¥åº export function ProcureOutsourcLeftTop() { return request({ url: 'KanBanManagerent/ProcureOutsourcLeftTop', @@ -40,15 +8,15 @@ }) } // å鸣éè´å§å¤çæ¿å·¦ä¸,å§å¤å¾ å ¥åº export function ProcureOutsourcLeftBottom() { // å£éä»åºçæ¿å·¦ä¸,éå®å¾ åè´§ export function ProductConsignmentLeftBottom() { return request({ url: 'KanBanManagerent/ProcureOutsourcLeftBottom', url: 'KanBanManagerent/ProductConsignmentLeftBottom', method: 'get' }) } // å鸣éè´å§å¤çæ¿å³ä¸,è¿ä¸å¨éè´å¾ å ¥åºç©ææè¡TOP5 // å£éä»åºçæ¿å³ä¸,è¿ä¸å¨éè´å¾ å ¥åºç©ææè¡TOP5 export function ProcureOutsourcRightTop() { return request({ url: 'KanBanManagerent/ProcureOutsourcRightTop', @@ -56,7 +24,39 @@ }) } // å鸣éè´å§å¤çæ¿å³ä¸,è¿ä¸å¨å§å¤å¾ å ¥åºäº§åæè¡TOP5 // å£éä»åºçæ¿å·¦ä¸,çäº§å¾ å ¥åº export function ProductionStockedInLeftTop() { return request({ url: 'KanBanManagerent/ProductionStockedInLeftTop', method: 'get' }) } // å£éçäº§çæ¿å³ä¸,è¿ä¸å¨çäº§å¾ å ¥åºäº§åæè¡TOP10 export function ProductionStockedInRightTop() { return request({ url: 'KanBanManagerent/ProductionStockedInRightTop', method: 'get' }) } // å£éä»åºçæ¿å³ä¸,è¿ä¸å¨éå®å¾ å货产åæè¡TOP5 export function ProductionStockedInRightBottom() { return request({ url: 'KanBanManagerent/ProductionStockedInRightBottom', method: 'get' }) } // å£ééè´å§å¤çæ¿å·¦ä¸,å§å¤å¾ å ¥åº export function ProcureOutsourcLeftBottom() { return request({ url: 'KanBanManagerent/ProcureOutsourcLeftBottom', method: 'get' }) } // å£ééè´å§å¤çæ¿å³ä¸,è¿ä¸å¨å§å¤å¾ å ¥åºäº§åæè¡TOP5 export function ProcureOutsourcRightBottom() { return request({ url: 'KanBanManagerent/ProcureOutsourcRightBottom', @@ -64,3 +64,35 @@ }) } // å£é车é´ç»¼åçæ¿,å·¦ä¸ç产订å export function WorkShopCompreLeftTop(data) { return request({ url: 'KanBanManagerent/WorkShopCompreLeftTop', method: 'get', params: data }) } // å£é车é´ç»¼åçæ¿,å³ä¸éå®è®¢å export function WorkShopCompreRightTop() { return request({ url: 'KanBanManagerent/WorkShopCompreRightTop', method: 'get' }) } // å£é车é´ç»¼åçæ¿,å·¦ä¸éè´è®¢å export function WorkShopCompreLeftBottom() { return request({ url: 'KanBanManagerent/WorkShopCompreLeftBottom', method: 'get' }) } // å£é车é´ç»¼åçæ¿,å³ä¸åºå export function WorkShopCompreRightBottom() { return request({ url: 'KanBanManagerent/WorkShopCompreRightBottom', method: 'get' }) } src/permission.js
@@ -8,7 +8,7 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration const whiteList = ['/login', '/warehouse', '/procure'] // no redirect whitelist const whiteList = ['/login', '/warehouse', '/produce'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar src/router/index.js
@@ -37,8 +37,8 @@ hidden: true }, { path: '/procure', component: () => import('@/views/kb/procure'), path: '/produce', component: () => import('@/views/kb/produce'), hidden: true }, { src/views/kb/procure.vue
ÎļþÒÑɾ³ý src/views/kb/produce.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,367 @@ <template> <div> <div class="kb_dashboard"> <div class="kb_backgroundCustom" /> <div class="kb_header"> <div class="kb_headTime" style="top: 35px;left: 20px"> <span>永康å¸å£é工贸æéå ¬å¸</span> </div> <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> <span>车é´ç产æ°ååçæ¿</span> </div> <div class="kb_headTime" style="top: 35px;right: 25px"> <span>{{ headTime }}</span> </div> </div> <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 950px"> <div style="width: 1350px;z-index: 2;margin-top: 50px;" class="flex_c_b"> <div style="height: 970px;"> <div class="smallTitle"> <svg-icon icon-class="cpdrk" class="svg_class" /> çäº§å¾ å ¥åº </div> <div class="lineContent horn" style="height: 890px"> <el-table ref="tableDataTopRef" :data="tableDataTop" style="width: 100%;" class="tableData" :header-cell-style="headerCellStyleCenter" :cell-style="cellStyleCenter" height="885" > <el-table-column prop="voucherdate" label="åæ®æ¥æ" width="131" > <template slot-scope="{row}"> <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div> <div v-else /> </template> </el-table-column> <el-table-column prop="wo" label="åæ®ç¼å·" width="189" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.wo }}</div> </template> </el-table-column> <el-table-column prop="wkshp_name" label="ç产车é´" width="105" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.wkshp_name }}</div> </template> </el-table-column> <el-table-column prop="saleOrderCode" label="éå®è®¢åå·" width="200" > <template slot-scope="{row}"> <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div> <div v-else>/</div> </template> </el-table-column> <!-- <el-table-column--> <!-- prop="materiel_code"--> <!-- label="产åç¼å·"--> <!-- width="136"--> <!-- >--> <!-- <template slot-scope="{row}">--> <!-- <div class="ellipsis">{{ row.materiel_code }}</div>--> <!-- </template>--> <!-- </el-table-column>--> <el-table-column prop="materiel_name" label="产ååç§°" width="200" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.materiel_name }}</div> </template> </el-table-column> <el-table-column prop="specification" label="è§æ ¼åå·" width="196" > <template slot-scope="{row}"> <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div> <div v-else>/</div> </template> </el-table-column> <el-table-column prop="stck_name" label="é¢å ¥ä»åº" width="120" > <template slot-scope="{row}"> <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div> <div v-else>/</div> </template> </el-table-column> <el-table-column prop="quantity" label="æ°é" width="83" /> <el-table-column prop="totalStockInQuantity" label="å·²å ¥åºæ°é" width="120" > <template slot-scope="{row}"> <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div> <div v-else>0</div> </template> </el-table-column> <!-- <el-table-column--> <!-- prop="uomname"--> <!-- label="åä½"--> <!-- width="50"--> <!-- />--> <!-- <el-table-column--> <!-- prop="preStartDate"--> <!-- label="é¢è®¡å¼å·¥"--> <!-- width="100"--> <!-- >--> <!-- <template slot-scope="{row}">--> <!-- <div v-if="row.preStartDate">{{ row.preStartDate.substring(0, 10) }}</div>--> <!-- <div v-else />--> <!-- </template>--> <!-- </el-table-column>--> <!-- <el-table-column--> <!-- prop="preFinishDate"--> <!-- label="é¢è®¡å ¥åº"--> <!-- width="140"--> <!-- >--> <!-- <template slot-scope="{row}">--> <!-- <div v-if="row.preFinishDate">{{ row.preFinishDate.substring(0, 10) }}</div>--> <!-- <div v-else />--> <!-- </template>--> <!-- </el-table-column>--> </el-table> </div> </div> </div> <div style="width: 500px;z-index: 2;margin-top: 50px;" class="flex_c_b"> <div style="height:970px;"> <div class="smallTitle"> <svg-icon icon-class="ph" class="svg_class" /> è¿ä¸å¨çäº§å¾ å ¥åºäº§åæè¡Top10 </div> <div class="lineContent horn" style="height: 890px"> <div id="bar03" style="width: 100%;height:100%; " /> <!--/* <div id="bar03" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />*/--> </div> </div> </div> </div> </div> </div> </template> <script> import './kbCommon.css' import { bar02, loadEcharts } from '@/utils/myEcharts' import { ProductionStockedInLeftTop, ProductionStockedInRightTop } from '@/api/kanbanManager' export default { name: 'Index2', data() { return { onLine: navigator.onLine, // çå¬ç½ç»æ¯å¦å¨çº¿ headTime: '', tableDataTop: [], tableDataBottom: [], MarqueeTipsContent: '', // å ¬å speed: 100, // å ¬åææ¾çé度 tableTopTask: null, tableBottomTask: null, echartsRightTop: null, echartsRightBottom: null, starsCount: 800, // æææ°é distance: 900 // é´è· } }, created() { setInterval(this.getNowTime, 1000) // 䏤尿¶çæ¿å·æ°ä¸æ¬¡ setInterval(() => { window.location.reload() }, 1000 * 60 * 120) }, mounted() { // çå¬ç½ç»æ¯å¦å¨çº¿ window.addEventListener('online', this.updateOnlineStatus) window.addEventListener('offline', this.updateOnlineStatus) this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true }) this.getProductionStockedInLeftTop() // this.getProcureOutsourcLeftBottom() this.getEcharts() }, beforeDestroy() { window.removeEventListener('online', this.updateOnlineStatus) window.removeEventListener('offline', this.updateOnlineStatus) }, methods: { // æ´æ°ç½ç»ç¶æ updateOnlineStatus(e) { if (e.isFirst) { // console.log('x') } else { const loading = this.$loading({ lock: true, text: 'æç½äºï¼æ£å¨æ¼å½èç½ä¸ï¼è¯·æ£æ¥ç½ç»æ¯å¦æ£å¸¸...', spinner: 'el-icon-loading', customClass: 'osloading', background: 'rgba(0, 0, 0, 0.7)' }) const { type } = e this.onLine = type === 'online' if (this.onLine) { loading.close() this.$message.success('ç½ç»è¿æ¥æåï¼') } else { this.$message.error('ç½ç»æçº¿ï¼è¯·å ³æ³¨ç½ç»ç¶æï¼') } } }, // è·åå·¦ä¸tableæ°æ® getProductionStockedInLeftTop() { ProductionStockedInLeftTop().then(res => { this.tableDataTop = res.data // this.number1 = this.tableDataTop.length const divData = this.$refs.tableDataTopRef.bodyWrapper // æ¿å°å ç´ åï¼å¯¹å ç´ è¿è¡å®æ¶å¢å è·ç¦»é¡¶é¨è·ç¦»ï¼å®ç°æ»å¨ææ(æ¤é 置为æ¯100毫ç§ç§»å¨1åç´ ) this.tableTopTask = setInterval(() => { // å ç´ èªå¢è·ç¦»é¡¶é¨1åç´ divData.scrollTop += 1 // divData.scrollTop += divData.scrollHeight / this.tableData.length // 夿å ç´ æ¯å¦æ»å¨å°åºé¨(å¯è§é«åº¦+è·ç¦»é¡¶é¨=æ´ä¸ªé«åº¦) if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { // éç½®tableè·ç¦»é¡¶é¨è·ç¦» divData.scrollTop = 0 ProductionStockedInLeftTop().then(res => { this.tableDataTop = res.data // this.number1 = this.tableDataTop.length if (this.tableDataTop.length > 10) { clearInterval(this.tableTopTask) this.getProductionStockedInLeftTop() } }) } }, this.tableDataTop.length <= 10 ? 1000 * 3 : 100) }) }, // è·åecharts getEcharts() { ProductionStockedInRightTop().then(res => { loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name))) }) this.echartsRightTop = setInterval(() => { ProductionStockedInRightTop().then(res => { loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name))) }) }, 1000 * 15) }, // è·åå½åæ¶é´ getNowTime() { const dt = new Date() const wk = dt.getDay() const y = dt.getFullYear() const m = (dt.getMonth() + 1 + '').padStart(2, '0') const d = (dt.getDate() + '').padStart(2, '0') const hh = (dt.getHours() + '').padStart(2, '0') const mm = (dt.getMinutes() + '').padStart(2, '0') const ss = (dt.getSeconds() + '').padStart(2, '0') const weeks = ['æææ¥', 'ææä¸', 'ææäº', 'ææä¸', 'ææå', 'ææäº', 'ææå '] const week = weeks[wk] this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}` }, headerCellStyleCenter() { return { backgroundColor: 'transparent ', padding: '10px 0', textAlign: 'center', color: '#07acc2', border: 'none', fontSize: '18px' } }, cellStyleCenter() { return { padding: '7.5px 0', textAlign: 'center', backgroundColor: 'transparent ', color: '#c7e7ff', border: 'none', fontSize: '18px' } } } } </script> <style scoped lang="scss"> $main_color:#09d8f2; $color01: #00FFFF; .tableData{ background: transparent; } ::v-deep .el-table th, ::v-deep .el-table tr, ::v-deep .el-table td { background-color: transparent; } .el-table__empty-text{ color: $main_color; } ::v-deep .el-table__body-wrapper::-webkit-scrollbar { /* width: 0;宽度为0æè */ width: 0; } ::v-deep .el-table::before { height: 0; } ::v-deep .cell { padding: 0 !important; //font-size: 16px; font-size: 18px; } </style> src/views/kb/warehouse.vue
@@ -5,7 +5,7 @@ <div class="kb_backgroundCustom" /> <div class="kb_header"> <div class="kb_headTime" style="top: 35px;left: 20px"> <span>永康å¸å鸣工贸æéå ¬å¸</span> <span>永康å¸å£é工贸æéå ¬å¸</span> </div> <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> @@ -22,7 +22,7 @@ <div style="height: 470px;"> <div class="smallTitle"> <svg-icon icon-class="cpdrk" class="svg_class" /> çäº§å¾ å ¥åº éè´å¾ å ¥åº </div> <div class="lineContent horn" style="height: 410px"> <el-table @@ -37,7 +37,7 @@ <el-table-column prop="voucherdate" label="åæ®æ¥æ" width="151" width="161" > <template slot-scope="{row}"> <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div> @@ -47,25 +47,25 @@ <el-table-column prop="wo" label="åæ®ç¼å·" width="189" width="199" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.wo }}</div> </template> </el-table-column> <el-table-column prop="wkshp_name" label="ç产车é´" width="105" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.wkshp_name }}</div> </template> </el-table-column> <!-- <el-table-column--> <!-- prop="wkshp_name"--> <!-- label="ç产车é´"--> <!-- width="105"--> <!-- >--> <!-- <template slot-scope="{row}">--> <!-- <div class="ellipsis">{{ row.wkshp_name }}</div>--> <!-- </template>--> <!-- </el-table-column>--> <el-table-column prop="saleOrderCode" label="éå®è®¢åå·" width="200" width="210" > <template slot-scope="{row}"> <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div> @@ -76,7 +76,7 @@ <el-table-column prop="materiel_name" label="产ååç§°" width="260" width="270" > <template slot-scope="{row}"> <div class="ellipsis">{{ row.materiel_name }}</div> @@ -85,7 +85,7 @@ <el-table-column prop="specification" label="è§æ ¼åå·" width="116" width="126" > <template slot-scope="{row}"> <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div> @@ -95,7 +95,7 @@ <el-table-column prop="stck_name" label="é¢å ¥ä»åº" width="110" width="125" > <template slot-scope="{row}"> <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div> @@ -105,12 +105,12 @@ <el-table-column prop="quantity" label="æ°é" width="73" width="93" /> <el-table-column prop="totalStockInQuantity" label="å·²å ¥åºæ°é" width="120" width="140" > <template slot-scope="{row}"> <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div> @@ -124,7 +124,7 @@ <div style="height: 470px;margin-top: 30px;"> <div class="smallTitle"> <svg-icon icon-class="cpdfh" class="svg_class" /> 产åå¾ åè´§ éå®å¾ åè´§ </div> <div class="lineContent horn" style="height: 410px"> <el-table @@ -197,7 +197,7 @@ <el-table-column prop="deliveryDate" label="é¢è®¡äº¤è´§æ¥æ" label="é¢è®¡äº¤ä»æ¥æ" width="200" > <template slot-scope="{row}"> @@ -225,7 +225,7 @@ <div style="height: 470px;"> <div class="smallTitle"> <svg-icon icon-class="ph" class="svg_class" /> è¿ä¸å¨çäº§å¾ å ¥åºäº§åæè¡Top5 è¿ä¸å¨éè´å¾ å ¥åºäº§åæè¡Top5 </div> <div class="lineContent horn" style="height: 410px"> <div id="bar03" style="width: 100%;height:100%; " /> @@ -253,9 +253,9 @@ import './kbCommon.css' import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts' import { ProductionStockedInLeftTop, ProcureOutsourcLeftTop, ProductConsignmentLeftBottom, ProductionStockedInRightTop, ProcureOutsourcRightTop, ProductionStockedInRightBottom } from '@/api/kanbanManager' @@ -298,7 +298,7 @@ window.addEventListener('offline', this.updateOnlineStatus) this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true }) this.getProductionStockedInLeftTop() this.getProcureOutsourcLeftTop() this.getProductConsignmentLeftBottom() this.getEcharts() }, @@ -330,8 +330,8 @@ } }, // è·åå·¦ä¸tableæ°æ® getProductionStockedInLeftTop() { ProductionStockedInLeftTop().then(res => { getProcureOutsourcLeftTop() { ProcureOutsourcLeftTop().then(res => { this.tableDataTop = res.data // this.number1 = this.tableDataTop.length const divData = this.$refs.tableDataTopRef.bodyWrapper @@ -344,12 +344,12 @@ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) { // éç½®tableè·ç¦»é¡¶é¨è·ç¦» divData.scrollTop = 0 ProductionStockedInLeftTop().then(res => { ProcureOutsourcLeftTop().then(res => { this.tableDataTop = res.data // this.number1 = this.tableDataTop.length if (this.tableDataTop.length > 10) { clearInterval(this.tableTopTask) this.getProductionStockedInLeftTop() this.getProcureOutsourcLeftTop() } }) } @@ -387,7 +387,7 @@ // è·åecharts getEcharts() { ProductionStockedInRightTop().then(res => { ProcureOutsourcRightTop().then(res => { loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name))) }) @@ -396,7 +396,7 @@ }) this.echartsRightTop = setInterval(() => { ProductionStockedInRightTop().then(res => { ProcureOutsourcRightTop().then(res => { loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name))) }) }, 1000 * 15)