Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
c33a1e3c80
|
@ -49,12 +49,34 @@
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in cateOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.belong_dept"
|
||||||
|
clearable
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
placeholder="执行部门"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.inout_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="出入库日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -94,7 +116,7 @@
|
||||||
{{ stateDict[scope.row.state] }}
|
{{ stateDict[scope.row.state] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出/入库日期" prop="inout_date">
|
<el-table-column label="出/入库日期" prop="inout_date" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="执行部门" prop="belong_dept_name">
|
<el-table-column label="执行部门" prop="belong_dept_name">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -213,13 +235,23 @@ export default {
|
||||||
form: {},
|
form: {},
|
||||||
apiObj: this.$API.inm.mio.list,
|
apiObj: this.$API.inm.mio.list,
|
||||||
selection: [],
|
selection: [],
|
||||||
|
deptOptions: [],
|
||||||
type: "",
|
type: "",
|
||||||
cate: "helpso",
|
cate: "helpso",
|
||||||
mioId: "",
|
mioId: "",
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDeptOptions();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDeptOptions() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.system.dept.list.req({ page: 0, type__in: "dept" }).then((res) => {
|
||||||
|
that.deptOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
//添加
|
//添加
|
||||||
add(type) {
|
add(type) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
|
@ -70,6 +70,12 @@
|
||||||
>隐</el-tag>
|
>隐</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="是否入车间库存">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.into_wm" effect="plain">是</el-tag>
|
||||||
|
<el-tag type="warning" v-else effect="plain">否</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="计量单位" prop="unit" sortable>
|
<el-table-column label="计量单位" prop="unit" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库位号" prop="bin_number_main" sortable>
|
<el-table-column label="仓库位号" prop="bin_number_main" sortable>
|
||||||
|
@ -124,6 +130,7 @@
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
|
:type="40"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
|
|
|
@ -18,6 +18,17 @@
|
||||||
placeholder="结束日期"
|
placeholder="结束日期"
|
||||||
style="width: 150px;"
|
style="width: 150px;"
|
||||||
/>
|
/>
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObjm"
|
||||||
|
v-model="query.material"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'full_name'"
|
||||||
|
style="width: 150px;"
|
||||||
|
:params="mquery"
|
||||||
|
@change="selectMaterialChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
|
@ -43,7 +54,12 @@
|
||||||
show-summary
|
show-summary
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="日期" prop="inout_date" sortable>
|
<el-table-column label="类型" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.mio_">{{typeDict[scope.row.mio_.type] }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="日期" prop="inout_date" sortable width="90">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料编号" show-overflow-tooltip min-width="80"
|
<el-table-column label="物料编号" show-overflow-tooltip min-width="80"
|
||||||
:filters="nameFilters1"
|
:filters="nameFilters1"
|
||||||
|
@ -85,7 +101,7 @@
|
||||||
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位" prop="batch"
|
<el-table-column label="单位" prop="batch" width="70"
|
||||||
:filters="nameFilters6"
|
:filters="nameFilters6"
|
||||||
:filter-method="filterName6"
|
:filter-method="filterName6"
|
||||||
filter-placement="bottom-end">
|
filter-placement="bottom-end">
|
||||||
|
@ -125,6 +141,20 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" prop="supplier_name">
|
<el-table-column label="供应商" prop="supplier_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
width="80"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="revertAndDel(scope.row)"
|
||||||
|
v-if="scope.row.mio_&&scope.row.mio_.state == 20"
|
||||||
|
>撤消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
|
@ -155,6 +185,12 @@ export default {
|
||||||
material__type:40,
|
material__type:40,
|
||||||
mio__state:20
|
mio__state:20
|
||||||
},
|
},
|
||||||
|
mquery:{
|
||||||
|
page: 0,
|
||||||
|
type__in: "40, 50, 60, 70",
|
||||||
|
is_hidden: false,
|
||||||
|
is_assemb: false,
|
||||||
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
nameFilters1: [],
|
nameFilters1: [],
|
||||||
|
@ -167,9 +203,10 @@ export default {
|
||||||
nameFilters8: [],
|
nameFilters8: [],
|
||||||
nameFilters9: [],
|
nameFilters9: [],
|
||||||
query: {
|
query: {
|
||||||
search: "",
|
search : "",
|
||||||
mio__inout_date__gte: "",
|
material : "",
|
||||||
mio__inout_date__lte: "",
|
mio__inout_date__gte : "",
|
||||||
|
mio__inout_date__lte : "",
|
||||||
},
|
},
|
||||||
stateDict: {
|
stateDict: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
|
@ -183,15 +220,16 @@ export default {
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
},
|
},
|
||||||
|
selectObj: {},
|
||||||
project_code:'',
|
project_code:'',
|
||||||
dataTotal:0,
|
dataTotal:0,
|
||||||
|
apiObjm:this.$API.mtm.material.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
||||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||||
this.params.mio = this.mioId;
|
this.params.mio = this.mioId;
|
||||||
// this.apiObj = this.$API.inm.mioitem.list;
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.getList();
|
that.getList();
|
||||||
},
|
},
|
||||||
|
@ -199,9 +237,13 @@ export default {
|
||||||
getList(val){
|
getList(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.params.page = val?val:1;
|
that.params.page = val?val:1;
|
||||||
|
that.params.with_mio = 'yes';
|
||||||
that.params.search = that.query.search;
|
that.params.search = that.query.search;
|
||||||
that.params.mio__inout_date__gte = that.query.mio__inout_date__gte;
|
that.params.mio__inout_date__gte = that.query.mio__inout_date__gte;
|
||||||
that.params.mio__inout_date__lte = that.query.mio__inout_date__lte;
|
that.params.mio__inout_date__lte = that.query.mio__inout_date__lte;
|
||||||
|
if(that.query.material!==''||that.query.material!==undefined||that.query.material!==null){
|
||||||
|
that.params.material = that.query.material;
|
||||||
|
}
|
||||||
that.$API.inm.mioitem.list.req(that.params).then((res) => {
|
that.$API.inm.mioitem.list.req(that.params).then((res) => {
|
||||||
if (res.count > 0) {
|
if (res.count > 0) {
|
||||||
that.tableData = res.results;
|
that.tableData = res.results;
|
||||||
|
@ -296,7 +338,10 @@ export default {
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
|
selectMaterialChange() {
|
||||||
|
var that = this;
|
||||||
|
that.query.material = that.selectObj.id;
|
||||||
|
},
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row,type){
|
printMaterial(row,type){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -339,7 +384,7 @@ export default {
|
||||||
sums[index] = "合计";
|
sums[index] = "合计";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (index == 8|| index == 10) {
|
if (index == 9|| index == 11) {
|
||||||
const values = data.map((item) =>
|
const values = data.map((item) =>
|
||||||
Number(item[column.property])
|
Number(item[column.property])
|
||||||
);
|
);
|
||||||
|
@ -387,6 +432,19 @@ export default {
|
||||||
filterName9(value, row) {
|
filterName9(value, row) {
|
||||||
return row. 入库凭证号 === value;
|
return row. 入库凭证号 === value;
|
||||||
},
|
},
|
||||||
|
revertAndDel(row){
|
||||||
|
let that = this;
|
||||||
|
that.$confirm('此操作将撤回并删除该记录, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(res=>{
|
||||||
|
that.$API.inm.mioitem.revertDel.req(row.id).then(res=>{
|
||||||
|
that.$message.success("撤回并删除成功");
|
||||||
|
that.getList(1);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -183,6 +183,12 @@
|
||||||
import { mCateEnum } from "@/utils/enum.js";
|
import { mCateEnum } from "@/utils/enum.js";
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 10,
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mCateEnum,
|
mCateEnum,
|
||||||
|
@ -260,6 +266,7 @@ export default {
|
||||||
if(this.project_code !== 'bxerp'){
|
if(this.project_code !== 'bxerp'){
|
||||||
this.options.push({ name: "辅助材料", id: 40 });
|
this.options.push({ name: "辅助材料", id: 40 });
|
||||||
}
|
}
|
||||||
|
this.form.type = this.type;
|
||||||
this.getProcessOptions();
|
this.getProcessOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -115,6 +115,12 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="是否入车间库存" v-if="activeName==40">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.into_wm" effect="plain">是</el-tag>
|
||||||
|
<el-tag type="warning" v-else effect="plain">否</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="计量单位"
|
label="计量单位"
|
||||||
prop="unit"
|
prop="unit"
|
||||||
|
|
|
@ -401,7 +401,7 @@ export default {
|
||||||
getMaterialIn() {
|
getMaterialIn() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.material.list
|
that.$API.mtm.material.list
|
||||||
.req({ page: 0, type__in: "10,20,30" })
|
.req({ page: 0, type__in: "10,20,30",ordering: "-create_time"})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.materialsIn = res;
|
that.materialsIn = res;
|
||||||
});
|
});
|
||||||
|
|
|
@ -210,16 +210,13 @@ export default {
|
||||||
getTid (){
|
getTid (){
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.t_id) {
|
if (that.t_id) {
|
||||||
that.$API.wpm.handover.item.req(that.t_id).then(res=>{
|
that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{
|
||||||
that.setData(res);
|
that.form = res;
|
||||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||||
that.type = "edit";
|
that.type = "edit";
|
||||||
}else{
|
}else{
|
||||||
that.type = "show";
|
that.type = "show";
|
||||||
}
|
}
|
||||||
that.$nextTick(()=>{
|
|
||||||
that.$refs.ticketd_b_start.init();
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -503,8 +503,10 @@ export default {
|
||||||
},
|
},
|
||||||
getEquipments(){
|
getEquipments(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let eqId = localStorage.getItem("bxerpChenckEquipmentId");
|
||||||
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
||||||
that.equipmentOptions = res;
|
that.equipmentOptions = res;
|
||||||
|
that.form.equipment = eqId;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getdefects(){
|
getdefects(){
|
||||||
|
@ -636,8 +638,13 @@ export default {
|
||||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
let str = item.rule_expression.replace(/`/g, '');
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||||
let judge = eval(str);
|
let judge = false;
|
||||||
row[item.defect_name] = judge;
|
try {
|
||||||
|
judge = eval(str);
|
||||||
|
row[index][item.defect_name] = judge;
|
||||||
|
}catch (error) {
|
||||||
|
console.error('error',error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
obj.ftest = {};
|
obj.ftest = {};
|
||||||
|
@ -745,9 +752,14 @@ export default {
|
||||||
that.qct_defects.forEach(item => {
|
that.qct_defects.forEach(item => {
|
||||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||||
let str = item.rule_expression.replace(/`/g, '');
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
str = str.replace(/\${(.*?)}/g, 'row.\$1');
|
||||||
let judge = eval(str);
|
let judge = false;
|
||||||
that.mlogbwlist[index][item.defect_name] = judge;
|
try {
|
||||||
|
judge = eval(str);
|
||||||
|
that.mlogbwlist[index][item.defect_name] = judge;
|
||||||
|
}catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
that.mlogbwlist[index][item.defect_name] = false;
|
that.mlogbwlist[index][item.defect_name] = false;
|
||||||
}
|
}
|
||||||
|
@ -794,6 +806,7 @@ export default {
|
||||||
},
|
},
|
||||||
equipmentChange(){
|
equipmentChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
localStorage.setItem("bxerpChenckEquipmentId",that.form.equipment);
|
||||||
that.equipmentOptions.forEach(item => {
|
that.equipmentOptions.forEach(item => {
|
||||||
if(item.id == that.form.equipment){
|
if(item.id == that.form.equipment){
|
||||||
that.form.equipment_name = item.name;
|
that.form.equipment_name = item.name;
|
||||||
|
|
Loading…
Reference in New Issue