a
This commit is contained in:
@@ -1,5 +1,15 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function AddGonghuoshang(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `insert into dbo.库存管理_供货商 (供货商) VALUES(\'${num}\')`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
export function initDepartmentName() {
|
export function initDepartmentName() {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
clearable
|
clearable
|
||||||
@dblclick.native="param=0;openSupplier()"/>
|
@dblclick.native="param=0;openSupplier()"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col style="width: 330px">
|
<el-col style="width: 420px">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@@ -114,9 +114,10 @@
|
|||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-refresh"
|
icon="el-icon-refresh"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin:10px 10px 3px"
|
style="margin:10px 5px 3px"
|
||||||
@click="CategoryMaintenance">维护物料类别
|
@click="CategoryMaintenance">维护物料类别
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="open()">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -437,11 +438,28 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible3" title="新增供应商" center style="min-height: 300px" width="400px">
|
||||||
|
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货商名称" prop="供货商名称">
|
||||||
|
<el-input v-model="form3.供货商名称" placeholder="供货商名称" size="small" clearable style="width:200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="cancel('form')">取消</el-button>
|
||||||
|
<el-button type="primary" @click="AddGonghuoshang('form3')">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
|
AddGonghuoshang,
|
||||||
initDepartmentName,
|
initDepartmentName,
|
||||||
initMaterialCategory,
|
initMaterialCategory,
|
||||||
initMaterialVariety,
|
initMaterialVariety,
|
||||||
@@ -466,6 +484,13 @@ import { mapGetters } from 'vuex'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
form3: {
|
||||||
|
供货商名称: ''
|
||||||
|
},
|
||||||
|
rules3: {
|
||||||
|
供货商名称: [{ required: true, message: '请输入供货商名称', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
dialogFormVisible3: false,
|
||||||
DepartmentValue: '', // 部门名称
|
DepartmentValue: '', // 部门名称
|
||||||
Department: [], // 部门数组
|
Department: [], // 部门数组
|
||||||
MaterialCategoryValue: '', // 物料类别
|
MaterialCategoryValue: '', // 物料类别
|
||||||
@@ -554,6 +579,28 @@ export default {
|
|||||||
this.searchMaterialCategory()
|
this.searchMaterialCategory()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
open() {
|
||||||
|
if (this.$refs['form3'] !== undefined) {
|
||||||
|
this.$refs['form3'].resetFields()
|
||||||
|
}
|
||||||
|
this.form3.供货商名称 = ''
|
||||||
|
this.dialogFormVisible3 = true
|
||||||
|
},
|
||||||
|
AddGonghuoshang(formName) {
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
AddGonghuoshang(this.form3.供货商名称).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
this.dialogFormVisible3 = false
|
||||||
|
} else {
|
||||||
|
this.dialogFormVisible3 = false
|
||||||
|
this.$message.error('添加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.getSelect(initDepartmentName, ['物料部门名称', '物料部门流水号'], 'Department') // 物料部门
|
this.getSelect(initDepartmentName, ['物料部门名称', '物料部门流水号'], 'Department') // 物料部门
|
||||||
this.getSelect(initMeasurementUnit, ['计量单位', '计量单位流水号'], 'MeasurementUnit') // 计量单位
|
this.getSelect(initMeasurementUnit, ['计量单位', '计量单位流水号'], 'MeasurementUnit') // 计量单位
|
||||||
|
|||||||
Reference in New Issue
Block a user