Compare commits

..

No commits in common. "60fb71791a6c0b44898ceea6f4bb6b2af1952150" and "b6d0d32b6fc408e66d50344c29cafd3b3c17b748" have entirely different histories.

3 changed files with 18 additions and 9 deletions

View File

@ -32,7 +32,7 @@
/> />
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<!-- <el-form-item v-if="false" :label="$t('module.art.artBOM')" prop="bomId"> <el-form-item v-if="false" :label="$t('module.art.artBOM')" prop="bomId">
<el-select <el-select
v-model="obj.bomId" v-model="obj.bomId"
:class="$style.select" :class="$style.select"
@ -47,7 +47,7 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<el-form-item :label="$t('module.art.description')" prop="description"> <el-form-item :label="$t('module.art.description')" prop="description">
<el-input v-model="obj.description" /> <el-input v-model="obj.description" />
</el-form-item> </el-form-item>
@ -63,7 +63,7 @@
</template> </template>
<script> <script>
import { add, update, getInfo, getCode } from '@/api/art-manage/art.js' import { add, update, getInfo, listSubstrate, listBom, getCode } from '@/api/art-manage/art.js'
import SubmitBar from '@/views/art/components/submit-bar' import SubmitBar from '@/views/art/components/submit-bar'
export default { export default {
@ -91,6 +91,8 @@ export default {
substrateId: '', substrateId: '',
bomId: '' bomId: ''
}, },
substrateList: [],
bomList: [],
rules: { rules: {
name: [ name: [
{ required: true, message: this.$t('module.art.artName') + this.$t('module.art.notNull'), trigger: 'blur' }, { required: true, message: this.$t('module.art.artName') + this.$t('module.art.notNull'), trigger: 'blur' },
@ -127,6 +129,14 @@ export default {
}, },
methods: { methods: {
init: async function() { init: async function() {
if (this.substrateList.length === 0) {
const substrateRes = await listSubstrate()
this.substrateList = substrateRes.data
}
if (this.bomList.length === 0) {
const bomRes = await listBom()
this.bomList = bomRes.data
}
if (this.id) { if (this.id) {
const res = await getInfo({ id: this.id }) const res = await getInfo({ id: this.id })
this.obj = res.data this.obj = res.data

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-03-03 09:16:10 * @Date: 2022-03-03 09:16:10
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-03-11 09:06:18 * @LastEditTime: 2022-03-08 14:34:24
* @Description: file content * @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\dashboard\index.vue * @FilePath: \mt-ck-wms-ui\src\views\dashboard\index.vue
--> -->
@ -41,7 +41,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="dashboard-layout-footer"> <div class="dashboard-layout-footer">
{{ '第' + rowIndex[index] + '排(' + ((current - 1) * 4 + item) + ')' }} {{ '第' + (index + 1) + '排(' + ((current - 1) * 4 + item) + ')' }}
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -68,7 +68,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="dashboard-layout-footer"> <div class="dashboard-layout-footer">
{{ '第' + rowIndex[index] + '排(' + ((current - 1) * 4 + item) + ')' }} {{ '第' + (index + 1) + '排(' + ((current - 1) * 4 + item) + ')' }}
</div> </div>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-03-03 15:47:47 * @Date: 2022-03-03 15:47:47
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-03-11 09:05:55 * @LastEditTime: 2022-03-07 20:41:47
* @Description: file content * @Description: file content
* @FilePath: \mt-ck-wms-ui\src\views\dashboard\testdata.js * @FilePath: \mt-ck-wms-ui\src\views\dashboard\testdata.js
*/ */
@ -2949,6 +2949,5 @@ export default {
4: '#FFA08F' 4: '#FFA08F'
}, },
current: 1, current: 1,
totalPage: 1, totalPage: 1
rowIndex: ['一', '二']
} }