Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2021-12-07 08:43:36 +08:00
commit 16aa96e305
1 changed files with 345 additions and 331 deletions

View File

@ -83,7 +83,8 @@
<el-link
v-if="checkPermission(['warehouse_update'])"
@click="handleInspection(scope)"
>检验</el-link
>检验
</el-link
>
</template>
</el-table-column>
@ -100,7 +101,8 @@
<el-tab-pane label="已合格半成品">
<el-card style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>批量入库</el-button
>批量入库
</el-button
>
<el-table
v-loading="listLoading"
@ -117,7 +119,7 @@
type="selection"
width="55">
</el-table-column>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
@ -158,14 +160,12 @@
</el-tabs>
<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
<el-select style="width: 100%" v-model="recordform" placeholder="请选择" @change="recordformChange">
<el-option
v-for="item in recordformList"
:key="item.id"
:label="item.name"
:value="item.id"
@change="recordformChange(item)"
@select="recordformChange(item)"
>
</el-option>
</el-select>
@ -207,7 +207,7 @@
</el-select>
</el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth">
<el-input v-model="form.remark" ></el-input>
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-form>
@ -215,7 +215,7 @@
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="putin"> </el-button>
</div>
</el-dialog>
</el-dialog>
<el-dialog title="半成品批量入库" :close-on-click-modal="false" :visible.sync="dialogFormVisibles">
<el-form :model="form">
<el-form-item label="仓库" :label-width="formLabelWidth">
@ -234,7 +234,7 @@
</el-select>
</el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth">
<el-input v-model="form.remark" ></el-input>
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-form>
@ -242,20 +242,20 @@
<el-button @click="dialogFormVisibles = false"> </el-button>
<el-button type="primary" @click="putins"> </el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import customForm from '@/components/customForm/index';
import { getwproductList ,wproductTest,wproductPutin,createputins} from "@/api/wpm";
import checkPermission from "@/utils/permission";
import { getWarehouseList } from "@/api/inm";
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultetestitem = {};
export default {
components: {Pagination,customForm},
import customForm from '@/components/customForm/index';
import {getwproductList, wproductTest, wproductPutin, createputins} from "@/api/wpm";
import checkPermission from "@/utils/permission";
import {getWarehouseList} from "@/api/inm";
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultetestitem = {};
export default {
components: {Pagination, customForm},
data() {
return {
testitem: defaultetestitem,
@ -281,6 +281,8 @@ export default {
page: 1,
page_size: 20,
},
formLabelWidth:'',
formLabelWidthL:'',
actstate_: {
6: "待复检",
10: "生产中",
@ -312,12 +314,15 @@ export default {
page: 0,
},
mutipID: [],
wproduct:null,
hasPicture: false,
outerVisible: false,
innerVisible: false,
dialogFormVisible: false,
dialogFormVisibles: false,
testrecord: {},
WarehouseData: "",
formName:'项目检查表',
};
},
computed: {},
@ -326,7 +331,7 @@ export default {
this.getList();
this.getList2();
this.getList1();
this.getLists();
// this.getLists();
},
methods: {
checkPermission,
@ -382,7 +387,11 @@ export default {
});
console.log(_this.mutipID);
createputins({warehouse: this.form.warehouse, wproducts: _this.mutipID, remark: this.form.remark}).then((res) => {
createputins({
warehouse: this.form.warehouse,
wproducts: _this.mutipID,
remark: this.form.remark
}).then((res) => {
if (res.code >= 200) {
this.$message.success("批量入库成功!");
this.dialogFormVisibles = false;
@ -392,12 +401,10 @@ export default {
},
//仓库列表
getWarehouseLists() {
getWarehouseList({page: 0}).then((response) => {
if (response.data) {
this.WarehouseData = response.data;
}
});
},
handleInspection(scope) {
@ -414,11 +421,18 @@ export default {
}
});
},
recordformChange(){
let that = this;
let arr = this.recordformList.filter(item=>{
return item.id=that.recordform;
})
that.formName = arr[0].name;
},
//根据选择的表渲染检查项目
submitrecordform() {
let that = this;
if (this.recordform != "") {
getrffieldList({form: this.recordform, page: 1,page_size:100}).then((response) => {
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
if (response.data) {
that.hasPicture = false;
let fieldList = response.data.results;
@ -493,5 +507,5 @@ export default {
});
},
},
}
}
</script>