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"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stateOptions"
|
||||
v-for="item in cateOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</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 class="right-panel">
|
||||
<el-input
|
||||
|
@ -94,7 +116,7 @@
|
|||
{{ stateDict[scope.row.state] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出/入库日期" prop="inout_date">
|
||||
<el-table-column label="出/入库日期" prop="inout_date" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column label="执行部门" prop="belong_dept_name">
|
||||
<template #default="scope">
|
||||
|
@ -213,13 +235,23 @@ export default {
|
|||
form: {},
|
||||
apiObj: this.$API.inm.mio.list,
|
||||
selection: [],
|
||||
deptOptions: [],
|
||||
type: "",
|
||||
cate: "helpso",
|
||||
mioId: "",
|
||||
visibleDrawer: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getDeptOptions();
|
||||
},
|
||||
methods: {
|
||||
getDeptOptions() {
|
||||
let that = this;
|
||||
that.$API.system.dept.list.req({ page: 0, type__in: "dept" }).then((res) => {
|
||||
that.deptOptions = res;
|
||||
});
|
||||
},
|
||||
//添加
|
||||
add(type) {
|
||||
this.dialog.save = true;
|
||||
|
|
|
@ -70,6 +70,12 @@
|
|||
>隐</el-tag>
|
||||
</template>
|
||||
</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>
|
||||
<el-table-column label="仓库位号" prop="bin_number_main" sortable>
|
||||
|
@ -124,6 +130,7 @@
|
|||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:type="40"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
|
|
|
@ -18,6 +18,17 @@
|
|||
placeholder="结束日期"
|
||||
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
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
|
@ -43,7 +54,12 @@
|
|||
show-summary
|
||||
>
|
||||
<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 label="物料编号" show-overflow-tooltip min-width="80"
|
||||
:filters="nameFilters1"
|
||||
|
@ -85,7 +101,7 @@
|
|||
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="batch"
|
||||
<el-table-column label="单位" prop="batch" width="70"
|
||||
:filters="nameFilters6"
|
||||
:filter-method="filterName6"
|
||||
filter-placement="bottom-end">
|
||||
|
@ -125,6 +141,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="supplier_name">
|
||||
</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-main>
|
||||
<el-footer>
|
||||
|
@ -155,6 +185,12 @@ export default {
|
|||
material__type:40,
|
||||
mio__state:20
|
||||
},
|
||||
mquery:{
|
||||
page: 0,
|
||||
type__in: "40, 50, 60, 70",
|
||||
is_hidden: false,
|
||||
is_assemb: false,
|
||||
},
|
||||
selection: [],
|
||||
tableData:[],
|
||||
nameFilters1: [],
|
||||
|
@ -167,9 +203,10 @@ export default {
|
|||
nameFilters8: [],
|
||||
nameFilters9: [],
|
||||
query: {
|
||||
search: "",
|
||||
mio__inout_date__gte: "",
|
||||
mio__inout_date__lte: "",
|
||||
search : "",
|
||||
material : "",
|
||||
mio__inout_date__gte : "",
|
||||
mio__inout_date__lte : "",
|
||||
},
|
||||
stateDict: {
|
||||
10: "创建中",
|
||||
|
@ -183,15 +220,16 @@ export default {
|
|||
other_in: "其他入库",
|
||||
other_out: "其他出库",
|
||||
},
|
||||
selectObj: {},
|
||||
project_code:'',
|
||||
dataTotal:0,
|
||||
apiObjm:this.$API.mtm.material.list,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||
this.params.mio = this.mioId;
|
||||
// this.apiObj = this.$API.inm.mioitem.list;
|
||||
let that = this;
|
||||
that.getList();
|
||||
},
|
||||
|
@ -199,9 +237,13 @@ export default {
|
|||
getList(val){
|
||||
let that = this;
|
||||
that.params.page = val?val:1;
|
||||
that.params.with_mio = 'yes';
|
||||
that.params.search = that.query.search;
|
||||
that.params.mio__inout_date__gte = that.query.mio__inout_date__gte;
|
||||
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) => {
|
||||
if (res.count > 0) {
|
||||
that.tableData = res.results;
|
||||
|
@ -296,7 +338,10 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
|
||||
selectMaterialChange() {
|
||||
var that = this;
|
||||
that.query.material = that.selectObj.id;
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row,type){
|
||||
let that = this;
|
||||
|
@ -339,7 +384,7 @@ export default {
|
|||
sums[index] = "合计";
|
||||
return;
|
||||
}
|
||||
if (index == 8|| index == 10) {
|
||||
if (index == 9|| index == 11) {
|
||||
const values = data.map((item) =>
|
||||
Number(item[column.property])
|
||||
);
|
||||
|
@ -387,6 +432,19 @@ export default {
|
|||
filterName9(value, row) {
|
||||
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>
|
||||
|
|
|
@ -183,6 +183,12 @@
|
|||
import { mCateEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
props: {
|
||||
type: {
|
||||
type: Number,
|
||||
default: 10,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mCateEnum,
|
||||
|
@ -260,6 +266,7 @@ export default {
|
|||
if(this.project_code !== 'bxerp'){
|
||||
this.options.push({ name: "辅助材料", id: 40 });
|
||||
}
|
||||
this.form.type = this.type;
|
||||
this.getProcessOptions();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -115,6 +115,12 @@
|
|||
>
|
||||
</template>
|
||||
</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
|
||||
label="计量单位"
|
||||
prop="unit"
|
||||
|
|
|
@ -401,7 +401,7 @@ export default {
|
|||
getMaterialIn() {
|
||||
let that = this;
|
||||
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) => {
|
||||
that.materialsIn = res;
|
||||
});
|
||||
|
|
|
@ -210,16 +210,13 @@ export default {
|
|||
getTid (){
|
||||
var that = this;
|
||||
if (that.t_id) {
|
||||
that.$API.wpm.handover.item.req(that.t_id).then(res=>{
|
||||
that.setData(res);
|
||||
that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{
|
||||
that.form = res;
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.type = "edit";
|
||||
}else{
|
||||
that.type = "show";
|
||||
}
|
||||
that.$nextTick(()=>{
|
||||
that.$refs.ticketd_b_start.init();
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -503,8 +503,10 @@ export default {
|
|||
},
|
||||
getEquipments(){
|
||||
let that = this;
|
||||
let eqId = localStorage.getItem("bxerpChenckEquipmentId");
|
||||
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
||||
that.equipmentOptions = res;
|
||||
that.form.equipment = eqId;
|
||||
})
|
||||
},
|
||||
getdefects(){
|
||||
|
@ -636,8 +638,13 @@ export default {
|
|||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||
let str = item.rule_expression.replace(/`/g, '');
|
||||
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||
let judge = eval(str);
|
||||
row[item.defect_name] = judge;
|
||||
let judge = false;
|
||||
try {
|
||||
judge = eval(str);
|
||||
row[index][item.defect_name] = judge;
|
||||
}catch (error) {
|
||||
console.error('error',error);
|
||||
}
|
||||
}
|
||||
});
|
||||
obj.ftest = {};
|
||||
|
@ -745,9 +752,14 @@ export default {
|
|||
that.qct_defects.forEach(item => {
|
||||
if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||
let str = item.rule_expression.replace(/`/g, '');
|
||||
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||
let judge = eval(str);
|
||||
that.mlogbwlist[index][item.defect_name] = judge;
|
||||
str = str.replace(/\${(.*?)}/g, 'row.\$1');
|
||||
let judge = false;
|
||||
try {
|
||||
judge = eval(str);
|
||||
that.mlogbwlist[index][item.defect_name] = judge;
|
||||
}catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}else{
|
||||
that.mlogbwlist[index][item.defect_name] = false;
|
||||
}
|
||||
|
@ -794,6 +806,7 @@ export default {
|
|||
},
|
||||
equipmentChange(){
|
||||
let that = this;
|
||||
localStorage.setItem("bxerpChenckEquipmentId",that.form.equipment);
|
||||
that.equipmentOptions.forEach(item => {
|
||||
if(item.id == that.form.equipment){
|
||||
that.form.equipment_name = item.name;
|
||||
|
|
Loading…
Reference in New Issue