Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
fcc36bf29b
|
|
@ -81,7 +81,7 @@
|
|||
<span v-if="item1 < 0 && ind == 5"
|
||||
>▲</span
|
||||
>
|
||||
<span v-if="item1 < 0 && ind == 5"
|
||||
<span v-if="item1 > 0 && ind == 5"
|
||||
>▼</span
|
||||
>
|
||||
{{ item1 }}
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
<span v-if="item1 < 0 && ind == 6"
|
||||
>▲</span
|
||||
>
|
||||
<span v-if="item1 < 0 && ind == 6"
|
||||
<span v-if="item1 > 0 && ind == 6"
|
||||
>▼</span
|
||||
>
|
||||
{{ item1 }}
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
<span v-if="item1 < 0 && ind == 6"
|
||||
>▲</span
|
||||
>
|
||||
<span v-if="item1 < 0 && ind == 6"
|
||||
<span v-if="item1 > 0 && ind == 6"
|
||||
>▼</span
|
||||
>
|
||||
{{ item1 }}
|
||||
|
|
@ -231,7 +231,7 @@
|
|||
<span v-if="item1 < 0 && ind == 6"
|
||||
>▲</span
|
||||
>
|
||||
<span v-if="item1 < 0 && ind == 6"
|
||||
<span v-if="item1 > 0 && ind == 6"
|
||||
>▼</span
|
||||
>
|
||||
{{ item1 }}
|
||||
|
|
@ -508,7 +508,7 @@ export default {
|
|||
let lastDiff = 0;
|
||||
|
||||
if (arrs[1] !== "/" && arrs[4] !== "/") {
|
||||
lastDiff = arrs[1] - arrs[4];
|
||||
lastDiff = (arrs[1] - arrs[4]).toFixed(2);
|
||||
} else {
|
||||
lastDiff = "/";
|
||||
}
|
||||
|
|
@ -532,10 +532,10 @@ export default {
|
|||
wrapArr0[index].elec_consume_unit
|
||||
) {
|
||||
sameRate =
|
||||
((arrs[1] -
|
||||
(((arrs[1] -
|
||||
wrapArr0[index].elec_consume_unit) /
|
||||
wrapArr0[index].elec_consume_unit) *
|
||||
100;
|
||||
100).toFixed(2);
|
||||
} else {
|
||||
sameRate = "/";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1231,19 +1231,13 @@ export default {
|
|||
that.tableDatas[3][2] = 0;
|
||||
|
||||
}else{
|
||||
that.tableDatas[1][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[2][2] = data4.elec_consume;
|
||||
that.tableDatas[3][2] = data4.production_cost_unit;}
|
||||
that.tableDatas[1][2] = data4.production_hour;
|
||||
that.tableDatas[2][2] = data4.run_hour;
|
||||
that.tableDatas[3][2] = data4.run_rate;
|
||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[5][2] = data4.elec_consume;
|
||||
}
|
||||
|
||||
if (data4.imaterial_data.length > 0) {
|
||||
data4.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[4][2] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[5][2] = item.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -1263,40 +1257,32 @@ export default {
|
|||
that.tableDatas[0][4],
|
||||
that.tableDatas[0][6]
|
||||
);
|
||||
that.tableDatas[1][4] = data2.elec_consume_unit;
|
||||
that.tableDatas[1][4] = data2.production_hour;
|
||||
that.tableDatas[1][7] = this.consume_precen(
|
||||
that.tableDatas[1][4],
|
||||
that.tableDatas[1][6]
|
||||
);
|
||||
that.tableDatas[2][4] = data2.elec_consume;
|
||||
that.tableDatas[3][4] =
|
||||
data2.production_cost_unit;
|
||||
that.tableDatas[2][4] = data2.run_hour;
|
||||
that.tableDatas[3][4] = data2.run_rate;
|
||||
that.tableDatas[3][7] = this.consume_precen(
|
||||
that.tableDatas[3][3],
|
||||
that.tableDatas[3][4],
|
||||
that.tableDatas[3][6]
|
||||
);
|
||||
that.tableDatas[2][7] = this.consume_precen(
|
||||
that.tableDatas[2][4],
|
||||
that.tableDatas[2][6]
|
||||
);
|
||||
if (data2.imaterial_data.length > 0) {
|
||||
data2.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[4][4] = (item.amount_consume).toFixed(2);
|
||||
that.tableDatas[4][7] = this.precen(
|
||||
that.tableDatas[4][4],
|
||||
that.tableDatas[4][4] = data2.elec_consume_unit;
|
||||
that.tableDatas[4][7] = this.consume_precen(
|
||||
(that.tableDatas[4][4]-that.tableDatas[4][6]),
|
||||
that.tableDatas[4][6]
|
||||
);
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[5][4] = (item.amount_consume).toFixed(2);
|
||||
that.tableDatas[5][7] = this.precen(
|
||||
that.tableDatas[5][4],
|
||||
that.tableDatas[5][4] = data2.elec_consume;
|
||||
that.tableDatas[5][7] = this.consume_precen(
|
||||
(that.tableDatas[5][4] - that.tableDatas[5][6]),
|
||||
that.tableDatas[5][6]
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
get_month_year_goal(year, month){
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" v-auth="'handover.create'" @click="table_add(20)">返工交接</el-button>
|
||||
<el-button type="primary" v-auth="'handover.create'">清除</el-button>
|
||||
<el-button type="primary" v-auth="'handover.create'" @click="table_add(50)">改版</el-button>
|
||||
<el-button type="primary" v-auth="'handover.create'" v-if="route_code=='scrap'" @click="table_bsofei(40,30)">合批报废</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
|
@ -26,7 +27,9 @@
|
|||
row-key="id"
|
||||
:params="params"
|
||||
:query="query"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="状态" prop="state" width="100" >
|
||||
<template #default="scope">
|
||||
<el-tag :type="wmState[scope.row.state]?.type">
|
||||
|
|
@ -41,9 +44,7 @@
|
|||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.material_name }}
|
||||
<span v-if="scope.row.material_origin != null"
|
||||
>({{ scope.row.material_origin_name }})</span
|
||||
>
|
||||
<span v-if="scope.row.material_origin != null">({{ scope.row.material_origin_name }})</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -91,6 +92,7 @@
|
|||
:type="type"
|
||||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:isFeiPinku="isFeiPinku"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
>
|
||||
|
|
@ -98,20 +100,27 @@
|
|||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "../wpm_gx/handover_form.vue";
|
||||
|
||||
import saveDialog from "../wpm_bx/handover_form.vue";
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
export default {
|
||||
components: {
|
||||
saveDialog
|
||||
},
|
||||
props: {
|
||||
isFeiPinku: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
name: "wmaterial",
|
||||
data() {
|
||||
return {
|
||||
wmState,
|
||||
apiObj: null,
|
||||
params: {
|
||||
state : 10,
|
||||
state_all: 1
|
||||
state_all: 1,
|
||||
mgroup:"",
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
@ -119,6 +128,7 @@ export default {
|
|||
query:{
|
||||
search:''
|
||||
},
|
||||
selectiones: [],
|
||||
type:20,
|
||||
mgroupName:'废品库',
|
||||
mgroupId:'',
|
||||
|
|
@ -129,25 +139,25 @@ export default {
|
|||
that.route_code = that.$route.path.split("/")[2];
|
||||
if(that.route_code=='scrap'){
|
||||
that.params.material__type = 30;
|
||||
}else{
|
||||
that.params.state = 50;
|
||||
}
|
||||
that.$API.mtm.mgroup.list.req({ page: 0,name:'废品库'}).then((res) => {
|
||||
that.mgroupId = that.params.mgroup = res[0].id;
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
res.forEach(item=>{
|
||||
if(item.name=="废品库"){
|
||||
that.mgroupId = item.id;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selectiones = selection;
|
||||
},
|
||||
//添加
|
||||
table_add(type) {
|
||||
this.dialog.save = true;
|
||||
this.type = type;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
this.$refs.saveDialog.open("add",this.selectiones);
|
||||
});
|
||||
},
|
||||
table_bsofei(type,mtype) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="车辆" prop="vehiclereg">
|
||||
<el-form-item label="车辆" prop="vehreg">
|
||||
<el-select v-model="form.vehreg" placeholder="请选择车辆" @change="vehChange" style="width: 100%;" :readonly="localMode === 'show'">
|
||||
<el-option
|
||||
v-for="item in vehRegList"
|
||||
|
|
@ -135,7 +135,7 @@ export default {
|
|||
ticket_:null,
|
||||
//验证规则
|
||||
rules: {
|
||||
vehiclereg: [{ required: true, message: "请输入车辆名称", trigger: "blur" }],
|
||||
vehreg: [{ required: true, message: "请输入车辆名称", trigger: "blur" }],
|
||||
vdate: [{ required: true, message: "请选择时间", trigger: "blur" }],
|
||||
// title: [{ required: true, message: "请输入容纳人数", trigger: "blur" }],
|
||||
},
|
||||
|
|
@ -234,7 +234,7 @@ export default {
|
|||
let that = this;
|
||||
let form = {};
|
||||
form.page = 0;
|
||||
form.vehiclereg = that.form.vehiclereg;
|
||||
form.vehreg = that.form.vehreg;
|
||||
form.vdate = that.form.vdate;
|
||||
that.timesList.forEach(slot=>{
|
||||
slot.sloted = false;
|
||||
|
|
@ -247,14 +247,14 @@ export default {
|
|||
},
|
||||
mdateChange(){
|
||||
let that = this;
|
||||
if(that.form.vehiclereg!==''&&that.form.vehiclereg!==null){
|
||||
if(that.form.vehreg!==''&&that.form.vehreg!==null){
|
||||
that.getmRoomSlot();
|
||||
}
|
||||
},
|
||||
vehChange(){
|
||||
let that = this;
|
||||
that.vehRegList.forEach(item=>{
|
||||
if(item.id == that.form.vehiclereg){
|
||||
if(item.id == that.form.vehreg){
|
||||
that.mroomName = item.name;
|
||||
that.bookingTitle = item.name+"预定";
|
||||
if(that.form.vdate!==''&&that.form.vdate!==null){
|
||||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
},
|
||||
handleEidt(id) {
|
||||
let that = this;
|
||||
that.$API.ofm.vehicleslot.list.req({booking:id,page:0}).then(res=>{
|
||||
that.$API.ofm.vehicleslot.list.req({vehicle_use:id,page:0}).then(res=>{
|
||||
res.forEach(item=>{
|
||||
that.timesList[item.slot].isSelect = true;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div class="left-panel" v-if="!isFeiPinku">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
v-auth="'handover.create'"
|
||||
>改版</el-button>
|
||||
</div>
|
||||
<div class="left-panel" v-else></div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
v-model="searchType"
|
||||
|
|
@ -250,6 +251,10 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
isFeiPinku: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
name: "handover",
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号" prop="new_batch">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50"></el-input>
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
|
||||
<span style="color: red;">请手动录入新批次号,不要用已有批次!</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -253,6 +253,10 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
isFeiPinku: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: "done",
|
||||
|
|
@ -409,16 +413,14 @@ export default {
|
|||
that.getUserList();
|
||||
}
|
||||
//获取交送物料
|
||||
if(that.type==10||that.type==50){//正常交接
|
||||
if(that.type==10){//正常交接
|
||||
that.getMaterial();
|
||||
}else if(that.type==20){//返工交接
|
||||
if(that.mgroupName=='废品库'){
|
||||
that.getMaterialFP();
|
||||
}else{
|
||||
that.getMaterialOkFangong();
|
||||
}
|
||||
}else if(that.type==40){//废品入库
|
||||
}else if(that.type==40){//废品入库不合格物料
|
||||
that.getMaterialNotok();
|
||||
}else if(that.type==50){//废品库物料
|
||||
that.getMaterialFP();
|
||||
}
|
||||
that.getMgroupOptions();
|
||||
},
|
||||
|
|
@ -474,12 +476,10 @@ export default {
|
|||
let that = this;
|
||||
var req = {
|
||||
page: 0,
|
||||
state:10,
|
||||
tag:that.tag,
|
||||
mgroupx:that.mgroupId
|
||||
};
|
||||
if(that.type!==50){
|
||||
req.state = 10;
|
||||
}
|
||||
that.materialOptions = [];
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res.filter(item=>{
|
||||
|
|
@ -507,9 +507,13 @@ export default {
|
|||
that.materialOptions = [];
|
||||
var obj = {
|
||||
page: 0,
|
||||
state : 50,
|
||||
state_all: 1
|
||||
};
|
||||
if(that.isFeiPinku){
|
||||
obj.state = 50;
|
||||
}else{
|
||||
obj.mgroupx=that.mgroupId;
|
||||
}
|
||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||
that.materialOptions = res.filter(item=>{
|
||||
return item.count_canhandover>0;
|
||||
|
|
@ -616,9 +620,17 @@ export default {
|
|||
if(data&&data!==''&&data.length>0){
|
||||
that.totalCount = 0;
|
||||
data.forEach((item,index)=>{
|
||||
item.wm = item.id;
|
||||
that.totalCount += Number(item.count);
|
||||
that.getWprList(item.wm,index);
|
||||
})
|
||||
console.log('that.isFeiPinku',that.isFeiPinku);
|
||||
if(that.isFeiPinku){
|
||||
console.log('data[0].material',data[0].material);
|
||||
that.form.new_batch = data[0].batch;
|
||||
that.form.material_changed = data[0].material;
|
||||
that.form.material_changed_fname = data[0].material_name;
|
||||
}
|
||||
}
|
||||
that.visible = true;
|
||||
return this;
|
||||
|
|
@ -636,9 +648,14 @@ export default {
|
|||
data = that.materialOptions.filter((item) => {
|
||||
return that.selectItems.indexOf(item.id)>-1;
|
||||
});
|
||||
if(that.type==50){
|
||||
if(that.type==50&&!that.isFeiPinku){
|
||||
that.form.new_batch = data[0].batch+'-G';
|
||||
}
|
||||
if(that.type==50&&that.isFeiPinku){
|
||||
that.form.new_batch = data[0].batch;
|
||||
that.form.material_changed = data[0].material;
|
||||
that.form.material_changed_fname = data[0].material_name;
|
||||
}
|
||||
let materialId = data[0].material;
|
||||
if(that.type==50){}else{
|
||||
let params = {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId="mgroupDept"
|
||||
:isFeiPinku="isFeiPinku"
|
||||
:process = "mgroupProcess"
|
||||
:processType = "mgroupProcessType"
|
||||
:mgroup_code="mgroup_code"
|
||||
|
|
@ -65,6 +66,7 @@
|
|||
:mgroupName="mgroupName"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId="mgroupDept"
|
||||
:isFeiPinku="isFeiPinku"
|
||||
:process = "mgroupProcess"
|
||||
:processType = "mgroupProcessType"
|
||||
:mgroup_code="mgroup_code"
|
||||
|
|
|
|||
|
|
@ -57,12 +57,18 @@
|
|||
<span v-if="!row.isEdit || !item.canEdit">{{ row[item.testitem_name] }}</span>
|
||||
<input v-if="item.testitem_field_type == 'input-number' && row.isEdit && item.canEdit"
|
||||
type="number" v-model="row[item.testitem_name]" @change="defectCountSun(row)">
|
||||
<input v-if="item.testitem_field_type == 'input-int' && row.isEdit && item.canEdit"
|
||||
type="number" v-model="row[item.testitem_name]" @change="defectCountSun(row)">
|
||||
<input v-if="item.testitem_field_type == 'input-text' && row.isEdit && item.canEdit"
|
||||
type="text" v-model="row[item.testitem_name]" @change="defectCountSun(row)">
|
||||
<select v-if="item.testitem_field_type == 'select-text' && row.isEdit && item.canEdit"
|
||||
v-model="row[item.testitem_name]" @change="defectCountSun(row)">
|
||||
<option v-for="item0 in item.testitem_choices" :key="item0" :value="item0">{{ item0 }}</option>
|
||||
</select>
|
||||
<select v-if="item.testitem_field_type == 'selects-text' && row.isEdit && item.canEdit"
|
||||
v-model="row[item.testitem_name]" @change="defectCountSun(row)">
|
||||
<option v-for="item0 in item.testitem_choices" :key="item0" :value="item0">{{ item0 }}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="w_80 inlineBlock padding_4 defectBlock" v-for="item in qct_defects" :key="item.id">
|
||||
<input type="checkbox" :disabled="!row.isEdit || !item.canEdit" v-model="row[item.defect_name]" @change="switchChange(row, item,index)">
|
||||
|
|
|
|||
Loading…
Reference in New Issue