This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//... | |
printPlanTask() { | |
if(!document.getElementById('printIframe')) { | |
let printIframe = document.createElement('iframe'); | |
printIframe.setAttribute('id', 'printIframe'); | |
printIframe.setAttribute('style', 'display:none'); | |
document.body.appendChild(printIframe); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
... | |
methods: { | |
... | |
validateRowForm(form, error, rules) { | |
return new Promise((resolve, reject) => { | |
new schema(rules).validate(form, (errors, fields) => { | |
if (fields) { | |
for (let k in fields) { | |
error[k] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as modules from '../views/basic/index' | |
import { compConfig } from './utils' | |
export default compConfig(modules, modules.baseUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="pug"> | |
tb-wrapper(title='配方工艺明细') | |
el-table(v-loading='loading', :data='data', border stripe) | |
el-table-column(label='原料', width='200px', prop='material.materialName' show-overflow-tooltip) | |
el-table-column(label='称料顺序', width='120px', align='center') | |
template(slot-scope="scope") | |
span(v-if="!scope.row.__editable__") {{ scope.row.weightSeq }} | |
m-input-number(v-else int :max="1000" v-model="scope.row.__form__.weightSeq" style="width:96%;") | |
el-table-column(label='投料顺序', width='120px', align='center') | |
template(slot-scope="scope") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { XTRequest } from './configure' | |
const IBASIC_API_BASE_URL = 'http://192.168.2.103:5555/ibasic-api' | |
export const iBaseAPI = new XTRequest(IBASIC_API_BASE_URL, ['custom', 'supplier', 'warehouse']).models | |
const api = iBaseAPI.custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import settings from 'settings' | |
export const baseUrls = new ProjectSettings(settings, [ | |
'ibasic-api', 'iqc-api' | |
]).baseUrls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
data() { | |
return { | |
pagination: { | |
currentPage: 1, | |
pageSizes: [5, 10, 50, 100], | |
pageSize: 10, | |
total: null, | |
layout: "sizes, prev, pager, next" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<m-searcher :kw="kw" :fields="searchFields" :placeholders="placeholders" @search="loadData"> | |
<el-select v-model="kw.moldsId" clearable size="small" @clear="loadData" class="search-box__input"> | |
<el-option :key="index" v-for="(o, index) in molds" | |
:label="o.code" :value="o.id"/> | |
</el-select> | |
</m-searcher> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch: { | |
'form.amount'(val, oldVal) { | |
if (!Number.isInteger(val)) { | |
this.$nextTick(() => { | |
this.form.amount = parseInt(val, 10) | |
}) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { api } from './configure' | |
export const Accessory = api('accessory') | |
export const Supplier = api('supplier') | |
export const Device = api('device') | |
export const Dict = api('dict') |