fix:#413---成品检验
This commit is contained in:
parent
a777e06d4b
commit
b28eb27d77
|
|
@ -1,132 +1,175 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
<el-button
|
||||||
</div>
|
type="primary"
|
||||||
<div class="right-panel">
|
icon="el-icon-plus"
|
||||||
<el-date-picker
|
@click="add"
|
||||||
v-model="query.date"
|
></el-button>
|
||||||
type="date"
|
</div>
|
||||||
value-format="YYYY-MM-DD"
|
<div class="right-panel">
|
||||||
/>
|
<el-date-picker
|
||||||
<el-button
|
v-model="query.date"
|
||||||
type="primary"
|
type="date"
|
||||||
icon="el-icon-search"
|
value-format="YYYY-MM-DD"
|
||||||
@click="handleQuery"
|
/>
|
||||||
>查询</el-button>
|
<el-button
|
||||||
</div>
|
type="primary"
|
||||||
</el-header>
|
icon="el-icon-search"
|
||||||
<el-main class="nopadding">
|
@click="handleQuery"
|
||||||
<scTable
|
>查询</el-button
|
||||||
ref="table"
|
>
|
||||||
:apiObj="apiObj"
|
</div>
|
||||||
row-key="id"
|
</el-header>
|
||||||
stripe
|
<el-main class="nopadding">
|
||||||
:params="query"
|
<scTable
|
||||||
>
|
ref="table"
|
||||||
<el-table-column type="index" width="50"/>
|
:apiObj="apiObj"
|
||||||
<el-table-column label="日期" prop="test_date" show-overflow-tooltip>
|
row-key="id"
|
||||||
</el-table-column>
|
stripe
|
||||||
<el-table-column label="批次号" prop="batch">
|
:params="query"
|
||||||
</el-table-column>
|
>
|
||||||
<el-table-column label="总数" prop="count">
|
<el-table-column type="index" width="50" />
|
||||||
</el-table-column>
|
<el-table-column
|
||||||
<el-table-column label="操作" fixed="right" width="150">
|
label="日期"
|
||||||
<template #default="scope">
|
prop="test_date"
|
||||||
<el-link type="primary" @click="table_edit(scope.row)">编辑</el-link>
|
show-overflow-tooltip
|
||||||
<el-divider direction="vertical"></el-divider>
|
>
|
||||||
<el-link type="primary" @click="table_check(scope.row)">检验</el-link>
|
</el-table-column>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-table-column label="批次号" prop="batch"> </el-table-column>
|
||||||
<el-link type="danger" @click="table_del(scope.row)">删除</el-link>
|
<el-table-column label="总数" prop="count"> </el-table-column>
|
||||||
</template>
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
</scTable>
|
<el-link type="primary" @click="table_edit(scope.row)"
|
||||||
</el-main>
|
>编辑</el-link
|
||||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleCheckSuccess" @closed="dialog.check = false">
|
>
|
||||||
</save-dialog>
|
<el-divider direction="vertical"></el-divider>
|
||||||
</el-container>
|
<el-link type="primary" @click="table_check(scope.row)"
|
||||||
|
>检验</el-link
|
||||||
|
>
|
||||||
|
<el-divider direction="vertical"></el-divider>
|
||||||
|
<el-link type="danger" @click="table_del(scope.row)"
|
||||||
|
>删除</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
|
</save-dialog>
|
||||||
|
|
||||||
|
<el-drawer title="成品检验" v-model="dialog.check" :size="'90%'">
|
||||||
|
<check-dialog
|
||||||
|
ref="checkDialogs"
|
||||||
|
:type="product_type"
|
||||||
|
:ftestWork="ftestWork"
|
||||||
|
>
|
||||||
|
</check-dialog>
|
||||||
|
</el-drawer>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./product_form.vue";
|
import saveDialog from "./product_form.vue";
|
||||||
export default {
|
import checkDialog from "./productCheck.vue";
|
||||||
name: "rparty",
|
export default {
|
||||||
components:{
|
name: "rparty",
|
||||||
saveDialog
|
components: {
|
||||||
},
|
saveDialog,
|
||||||
data() {
|
checkDialog,
|
||||||
return {
|
},
|
||||||
apiObj: this.$API.qm.ftestwork.list,
|
data() {
|
||||||
dialog:{
|
return {
|
||||||
check:false,
|
apiObj: this.$API.qm.ftestwork.list,
|
||||||
},
|
dialog: {
|
||||||
query: {
|
save: false,
|
||||||
page:1,
|
check: false,
|
||||||
page_size:20,
|
},
|
||||||
type:10
|
query: {
|
||||||
},
|
page: 1,
|
||||||
selection: [],
|
page_size: 20,
|
||||||
};
|
type: 10,
|
||||||
},
|
},
|
||||||
methods: {
|
selection: [],
|
||||||
add() {
|
};
|
||||||
this.dialog.save = true;
|
},
|
||||||
this.$nextTick(() => {
|
methods: {
|
||||||
this.$refs.saveDialog.open("add");
|
add() {
|
||||||
});
|
this.dialog.save = true;
|
||||||
},
|
this.$nextTick(() => {
|
||||||
table_edit(row) {
|
this.$refs.saveDialog.open("add");
|
||||||
this.dialog.save = true;
|
});
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
table_edit(row) {
|
||||||
});
|
this.dialog.save = true;
|
||||||
},
|
this.$nextTick(() => {
|
||||||
table_del(row){
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
});
|
||||||
type: "warning",
|
},
|
||||||
}).then(() => {
|
table_del(row) {
|
||||||
this.$API.qm.ftestwork.delete.req(row.id).then((res) => {
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
this.$message.success("删除成功");
|
type: "warning",
|
||||||
this.$refs.table.refresh();
|
})
|
||||||
return res;
|
.then(() => {
|
||||||
}).catch((err) => {
|
this.$API.qm.ftestwork.delete
|
||||||
return err;
|
.req(row.id)
|
||||||
});
|
.then((res) => {
|
||||||
}).catch(() => { });
|
this.$message.success("删除成功");
|
||||||
},
|
this.$refs.table.refresh();
|
||||||
//查看
|
return res;
|
||||||
table_show(row) {
|
})
|
||||||
this.dialog.save = true;
|
.catch((err) => {
|
||||||
this.$nextTick(() => {
|
return err;
|
||||||
this.$refs.saveDialog.open("show",10).setData(row);
|
});
|
||||||
});
|
})
|
||||||
},
|
.catch(() => {});
|
||||||
table_check(row){
|
},
|
||||||
// console.log('ftestWork',row)
|
//查看
|
||||||
let type = '';
|
table_show(row) {
|
||||||
if(row.material_name.indexOf('棒')>-1){
|
this.dialog.save = true;
|
||||||
type = 'bang';
|
this.$nextTick(() => {
|
||||||
}else{
|
this.$refs.saveDialog.open("show", 10).setData(row);
|
||||||
type='guan';
|
});
|
||||||
}
|
},
|
||||||
this.$router.push({
|
table_check(row) {
|
||||||
name: "productDetail",
|
debugger;
|
||||||
query: {
|
console.log(row);
|
||||||
type:type,
|
let that = this;
|
||||||
ftestWork:row.id
|
let type = "";
|
||||||
},
|
if (row.material_name.indexOf("棒") > -1) {
|
||||||
});
|
type = "bang";
|
||||||
},
|
} else {
|
||||||
handleQuery() {
|
type = "guan";
|
||||||
this.$refs.table.queryData(this.query)
|
}
|
||||||
},
|
that.product_type = type;
|
||||||
resetQuery() {
|
that.ftestWork = row.id;
|
||||||
this.query = {};
|
that.dialog.check = true;
|
||||||
},
|
// this.$router.push({
|
||||||
handleCheckSuccess(){
|
// name: "productDetail",
|
||||||
this.dialog.save = false;
|
// query: {
|
||||||
this.$refs.table.refresh();
|
// type: type,
|
||||||
},
|
// ftestWork: row.id,
|
||||||
},
|
// },
|
||||||
};
|
// });
|
||||||
</script>
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
handleSaveSuccess() {
|
||||||
|
this.dialog.save = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
handleCheckSuccess() {
|
||||||
|
this.dialog.check = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,17 @@
|
||||||
import saveDialog from "./product_check.vue";
|
import saveDialog from "./product_check.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "mioitem",
|
name: "mioitem",
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
props: {
|
||||||
|
ftestWork: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
},
|
},
|
||||||
|
|
@ -318,8 +329,8 @@ export default {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {},
|
params: {},
|
||||||
formTableData: [],
|
formTableData: [],
|
||||||
ftestWork: "",
|
// ftestWork: "",
|
||||||
type: "",
|
// type: "",
|
||||||
userList: [],
|
userList: [],
|
||||||
workObj: {},
|
workObj: {},
|
||||||
};
|
};
|
||||||
|
|
@ -332,8 +343,8 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.type = that.$route.query.type;
|
// that.type = that.$route.query.type;
|
||||||
that.ftestWork = that.$route.query.ftestWork;
|
// that.ftestWork = that.$route.query.ftestWork;
|
||||||
that.addTemplate.ftest_work = that.ftestWork;
|
that.addTemplate.ftest_work = that.ftestWork;
|
||||||
that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => {
|
that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => {
|
||||||
that.workObj = res;
|
that.workObj = res;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue