Commit e828d31b authored by hubaoshan's avatar hubaoshan

第三步

parent b7b9727e
......@@ -116,6 +116,11 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="cj" prop="cj" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.cj || '-' }}
</template>
</el-table-column>
<el-table-column label="ptype" prop="ptype" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.ptype=== '1'">jb</span>
......@@ -219,6 +224,20 @@
/>
</el-select>
</el-form-item>
<el-form-item label="cj" prop="cj">
<el-select
v-model="form.cj"
class="normalSelect"
placeholder="请选择厂家"
>
<el-option
v-for="item in manufacturer"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="ptype" prop="ptype">
<el-select
v-model="form.ptype"
......@@ -276,14 +295,14 @@
<el-input
v-model.trim="form.remarks"
type="textarea"
:rows="5"
:rows="2"
maxlength="200"
show-word-limit
placeholder="请输入内容"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer" style="bottom: 0">
<el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
</div>
......@@ -324,8 +343,7 @@
<div class="importOne">
<div>
<!-- 下载模型按钮 -->
<div class="downloadTemplateDiv">
</div>
<div class="downloadTemplateDiv" />
<div v-if="typeFrom.type === '1'" class="uploadCont">
<el-upload
accept=".xlsx, .xls"
......@@ -437,11 +455,15 @@
<span>{{ singleDetails.remarks|| '-' }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="cj:" prop="cj">
<span>{{ singleDetails.cj|| '-' }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
......@@ -474,9 +496,22 @@ export default {
},
{
label: 'jl',
value: '20'
value: '2'
}
],
manufacturer: [{
value: '1',
label: 'baidu'
}, {
value: '2',
label: 'ali'
}, {
value: '3',
label: 'taobao'
}],
// 导入列表
files: [],
// 下载模板loading
......@@ -508,6 +543,7 @@ export default {
warehouseList: [],
openqty: false,
singleDetails: {
cj: '',
whId: '',
ptype: '',
pn: '',
......@@ -578,6 +614,7 @@ export default {
queryParams: {
page: 1,
rows: 10,
cj: undefined,
pn: undefined,
qty: undefined,
whId: undefined,
......@@ -590,7 +627,7 @@ export default {
flag: ''
},
// 表单参数
form: {},
form: { cj: '1' },
// 表单校验
rules: {
whId: [
......@@ -611,7 +648,7 @@ export default {
qty: [
{ required: true, message: '请输入qty的值', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)$/, message: '输入值不符合格式要求,请重新输入', trigger: 'blur' }
],
]
}
}
},
......@@ -632,16 +669,19 @@ export default {
created() {
this.getList() // 列表查询
this.getwareHouse() // 查询数据字典
// this.form.cj = this.manufacturer[0].value
},
methods: {
// 输入值发生变化时触发查询操作
handleInputChange() {
this.queryQty()
},
// 查询qty
queryQty() {
if ( this.form.ptype &&this.form.ptype !== '' && this.form.ptype === '20') {
if(this.form.pn && this.form.pn !== '' && this.form.lot && this.form.lot !== '' ) {
if (this.form.ptype && this.form.ptype !== '' && this.form.ptype === '20') {
if (this.form.pn && this.form.pn !== '' && this.form.lot && this.form.lot !== '') {
const obj = {
pn: this.form.pn,
lot: this.form.lot,
......@@ -653,8 +693,8 @@ export default {
} else {
this.warehousedata.qty = null
}
} else if (this.form.ptype &&this.form.ptype !== '' && this.form.ptype === "1"){
if (this.form.pn && this.form.pn !== '' && this.form.lot && this.form.lot !== '' && this.form.rank && this.form.rank != '') {
} else if (this.form.ptype && this.form.ptype !== '' && this.form.ptype === '1') {
if (this.form.pn && this.form.pn !== '' && this.form.lot && this.form.lot !== '' && this.form.rank && this.form.rank !== '') {
const obj = {
pn: this.form.pn,
lot: this.form.lot,
......@@ -767,6 +807,10 @@ export default {
const dictItem = this.warehouseList.find(item => item.dictValue === whId)
return dictItem ? dictItem.dictLabel : null
},
getManufacturerLabel(cj) {
const manufacturer = this.manufacturer.find(item => item.value === cj)
return manufacturer ? manufacturer.dictLabel : null
},
/** 查询数据字典*/
getwareHouse() {
getDicts('WAREHOUSE').then(res => {
......@@ -795,6 +839,7 @@ export default {
// 表单重置
reset() {
this.form = {
cj: '1',
businessId: undefined,
remarks: undefined,
pn: undefined,
......@@ -820,6 +865,7 @@ export default {
this.queryParams = {
page: 1,
rows: 10,
cj: undefined,
pn: undefined,
qty: undefined,
whId: undefined,
......@@ -945,7 +991,10 @@ export default {
})
})
}
}
},
mounted() {
this.form.cj = this.manufacturer[0].value
},
}
</script>
<style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment