This commit is contained in:
TianyangZhang 2025-12-11 09:43:10 +08:00
commit 76aa788335
10 changed files with 91 additions and 46 deletions

View File

@ -279,7 +279,7 @@ const loadCesium = async () => {
await import("cesium/Build/Cesium/Widgets/widgets.css"); await import("cesium/Build/Cesium/Widgets/widgets.css");
Cesium = await import('cesium'); Cesium = await import('cesium');
Cesium.Ion.defaultAccessToken = Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1Yzg3ZDEzOS0zN2Q1LTQ2N2YtOWJhMy1mNWU4MWY5N2ExYzkiLCJpZCI6MjAxMzIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzY4MTIzNzR9.SfNeHedDyXWLIPiNbc4qSsHBACm7uvaqRsQprL2J4Cw"; "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MjJiNDIxZS0wM2QzLTQ4ZDAtODI3Ny1lOWM5M2NlMDY3MDIiLCJpZCI6MzY3OTI4LCJpYXQiOjE3NjUyNjU3NDN9.DQPVOi6Iyre4L2pSEowtWydgX3EYPbBmkzQgeC-FTa4";
} }
export default { export default {
name: "cesium", name: "cesium",

View File

@ -433,9 +433,9 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
Cesium.Ion.defaultAccessToken = Cesium.Ion.defaultAccessToken ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmMmNmMzhhOS0yMzI2LTQ4M2UtYjg2ZS0zZTM0ZWFlZDQ4MWQiLCJpZCI6MjAxODA0LCJpYXQiOjE3NjUxODMyNzR9.lJJBP_YxrRN8CngWtPQLnNhfk0NQGuBfxRsMW1mtAyk";
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1Yzg3ZDEzOS0zN2Q1LTQ2N2YtOWJhMy1mNWU4MWY5N2ExYzkiLCJpZCI6MjAxMzIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzY4MTIzNzR9.SfNeHedDyXWLIPiNbc4qSsHBACm7uvaqRsQprL2J4Cw"; // "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1Yzg3ZDEzOS0zN2Q1LTQ2N2YtOWJhMy1mNWU4MWY5N2ExYzkiLCJpZCI6MjAxMzIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzY4MTIzNzR9.SfNeHedDyXWLIPiNbc4qSsHBACm7uvaqRsQprL2J4Cw";
const viewer = new Cesium.Viewer("cesiumContainer", { const viewer = new Cesium.Viewer("cesiumContainer", {
animation: false, // animation: false, //
baseLayerPicker: false, // baseLayerPicker: false, //

View File

@ -2,7 +2,8 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <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> <el-button type="primary" v-auth="'handover.create'" v-if="route_code=='scrap'" @click="table_bsofei(40,30)">合批报废</el-button>
</div> </div>
<div class="right-panel"> <div class="right-panel">
@ -26,13 +27,15 @@
row-key="id" row-key="id"
:params="params" :params="params"
:query="query" :query="query"
@selection-change="selectionChange"
> >
<el-table-column label="状态" prop="state" width="100" > <el-table-column type="selection" width="50" />
<template #default="scope"> <el-table-column label="状态" prop="state" width="100" >
<el-tag :type="wmState[scope.row.state]?.type"> <template #default="scope">
{{wmState[scope.row.state]?.text}} <el-tag :type="wmState[scope.row.state]?.type">
</el-tag> {{wmState[scope.row.state]?.text}}
</template> </el-tag>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="物料名称" label="物料名称"
@ -41,9 +44,7 @@
> >
<template #default="scope"> <template #default="scope">
{{ scope.row.material_name }} {{ scope.row.material_name }}
<span v-if="scope.row.material_origin != null" <span v-if="scope.row.material_origin != null">{{ scope.row.material_origin_name }}</span>
>{{ scope.row.material_origin_name }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -91,6 +92,7 @@
:type="type" :type="type"
:mgroupName="mgroupName" :mgroupName="mgroupName"
:mgroupId="mgroupId" :mgroupId="mgroupId"
:isFeiPinku="isFeiPinku"
@success="handleSaveSuccess" @success="handleSaveSuccess"
@closed="dialog.save = false" @closed="dialog.save = false"
> >
@ -98,20 +100,27 @@
</el-container> </el-container>
</template> </template>
<script> <script>
import saveDialog from "../wpm_gx/handover_form.vue";
import saveDialog from "../wpm_bx/handover_form.vue";
import { wmState } from "@/utils/enum.js"; import { wmState } from "@/utils/enum.js";
export default { export default {
components: { components: {
saveDialog saveDialog
}, },
props: {
isFeiPinku: {
type: Boolean,
default: false,
},
},
name: "wmaterial", name: "wmaterial",
data() { data() {
return { return {
wmState, wmState,
apiObj: null, apiObj: null,
params: { params: {
state : 50, state_all: 1,
state_all: 1 mgroup:"",
}, },
dialog: { dialog: {
save: false, save: false,
@ -119,6 +128,7 @@ export default {
query:{ query:{
search:'' search:''
}, },
selectiones: [],
type:20, type:20,
mgroupName:'废品库', mgroupName:'废品库',
mgroupId:'', mgroupId:'',
@ -128,26 +138,26 @@ export default {
let that = this; let that = this;
that.route_code = that.$route.path.split("/")[2]; that.route_code = that.$route.path.split("/")[2];
if(that.route_code=='scrap'){ if(that.route_code=='scrap'){
that.params.material__type__in = 30; that.params.material__type = 30;
}else{
that.params.state = 50;
} }
that.apiObj = that.$API.wpm.wmaterial.list; that.$API.mtm.mgroup.list.req({ page: 0,name:'废品库'}).then((res) => {
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { that.mgroupId = that.params.mgroup = res[0].id;
that.mgroupOptions = res; that.apiObj = that.$API.wpm.wmaterial.list;
res.forEach(item=>{
if(item.name=="废品库"){
that.mgroupId = item.id;
}
})
}); });
}, },
methods: { methods: {
//
selectionChange(selection) {
this.selectiones = selection;
},
// //
table_add(type) { table_add(type) {
this.dialog.save = true; this.dialog.save = true;
this.type = type; this.type = type;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.saveDialog.open("add"); this.$refs.saveDialog.open("add",this.selectiones);
}); });
}, },
table_bsofei(type,mtype) { table_bsofei(type,mtype) {

View File

@ -284,6 +284,7 @@ export default {
type: "do_in", type: "do_in",
loading: false, loading: false,
mode: "add", mode: "add",
query: {},
titleMap: { titleMap: {
do_out: "生产领料", do_out: "生产领料",
sale_out: "销售发货", sale_out: "销售发货",

View File

@ -1,7 +1,7 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel" v-if="!isFeiPinku">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@ -22,6 +22,7 @@
v-auth="'handover.create'" v-auth="'handover.create'"
>改版</el-button> >改版</el-button>
</div> </div>
<div class="left-panel" v-else></div>
<div class="right-panel"> <div class="right-panel">
<el-select <el-select
v-model="searchType" v-model="searchType"
@ -250,6 +251,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
isFeiPinku: {
type: Boolean,
default: false,
},
}, },
name: "handover", name: "handover",
components: { components: {

View File

@ -224,7 +224,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="change_batch"> <el-col :md="12" :sm="24" v-if="change_batch">
<el-form-item label="新批次号" prop="new_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> <span style="color: red;">请手动录入新批次号不要用已有批次</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -253,6 +253,10 @@ export default {
type: String, type: String,
default: "", default: "",
}, },
isFeiPinku: {
type: Boolean,
default: false,
},
tag: { tag: {
type: String, type: String,
default: "done", default: "done",
@ -409,16 +413,14 @@ export default {
that.getUserList(); that.getUserList();
} }
// //
if(that.type==10||that.type==50){// if(that.type==10){//
that.getMaterial(); that.getMaterial();
}else if(that.type==20){// }else if(that.type==20){//
if(that.mgroupName=='废品库'){ that.getMaterialOkFangong();
that.getMaterialFP(); }else if(that.type==40){//
}else{
that.getMaterialOkFangong();
}
}else if(that.type==40){//
that.getMaterialNotok(); that.getMaterialNotok();
}else if(that.type==50){//
that.getMaterialFP();
} }
that.getMgroupOptions(); that.getMgroupOptions();
}, },
@ -474,12 +476,10 @@ export default {
let that = this; let that = this;
var req = { var req = {
page: 0, page: 0,
state:10,
tag:that.tag, tag:that.tag,
mgroupx:that.mgroupId mgroupx:that.mgroupId
}; };
if(that.type!==50){
req.state = 10;
}
that.materialOptions = []; that.materialOptions = [];
this.$API.wpm.wmaterial.list.req(req).then((res) => { this.$API.wpm.wmaterial.list.req(req).then((res) => {
that.materialOptions = res.filter(item=>{ that.materialOptions = res.filter(item=>{
@ -507,9 +507,13 @@ export default {
that.materialOptions = []; that.materialOptions = [];
var obj = { var obj = {
page: 0, page: 0,
state : 50,
state_all: 1 state_all: 1
}; };
if(that.isFeiPinku){
obj.state = 50;
}else{
obj.mgroupx=that.mgroupId;
}
that.$API.wpm.wmaterial.list.req(obj).then((res) => { that.$API.wpm.wmaterial.list.req(obj).then((res) => {
that.materialOptions = res.filter(item=>{ that.materialOptions = res.filter(item=>{
return item.count_canhandover>0; return item.count_canhandover>0;
@ -616,9 +620,17 @@ export default {
if(data&&data!==''&&data.length>0){ if(data&&data!==''&&data.length>0){
that.totalCount = 0; that.totalCount = 0;
data.forEach((item,index)=>{ data.forEach((item,index)=>{
item.wm = item.id;
that.totalCount += Number(item.count); that.totalCount += Number(item.count);
that.getWprList(item.wm,index); 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; that.visible = true;
return this; return this;
@ -636,9 +648,14 @@ export default {
data = that.materialOptions.filter((item) => { data = that.materialOptions.filter((item) => {
return that.selectItems.indexOf(item.id)>-1; 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'; 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; let materialId = data[0].material;
if(that.type==50){}else{ if(that.type==50){}else{
let params = { let params = {

View File

@ -54,6 +54,7 @@
:mgroupName="mgroupName" :mgroupName="mgroupName"
:mgroupId="mgroupId" :mgroupId="mgroupId"
:deptId="mgroupDept" :deptId="mgroupDept"
:isFeiPinku="isFeiPinku"
:process = "mgroupProcess" :process = "mgroupProcess"
:processType = "mgroupProcessType" :processType = "mgroupProcessType"
:mgroup_code="mgroup_code" :mgroup_code="mgroup_code"
@ -65,6 +66,7 @@
:mgroupName="mgroupName" :mgroupName="mgroupName"
:mgroupId="mgroupId" :mgroupId="mgroupId"
:deptId="mgroupDept" :deptId="mgroupDept"
:isFeiPinku="isFeiPinku"
:process = "mgroupProcess" :process = "mgroupProcess"
:processType = "mgroupProcessType" :processType = "mgroupProcessType"
:mgroup_code="mgroup_code" :mgroup_code="mgroup_code"

View File

@ -557,9 +557,10 @@ export default {
params.tid = row.id; params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name; let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification; let specification = row.material_.specification;
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){ if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='tuomoceliang'){
params.label_template_name = '工序带板段号打印模板'; params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','','']; let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length; let leng = res.length;
@ -571,6 +572,7 @@ export default {
} }
} }
if(leng>0){ if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3; let nums = leng/3;
for(let i=0;i<nums;i++){ for(let i=0;i<nums;i++){
let index = i*3; let index = i*3;
@ -583,7 +585,7 @@ export default {
} }
} }
} }
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]}; params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,totalcount:totalcount,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
that.apiObjPrint.req(params).then((res) => { that.apiObjPrint.req(params).then((res) => {
let obj = {}; let obj = {};
obj.printer_commands = res.commands; obj.printer_commands = res.commands;

View File

@ -586,10 +586,11 @@ export default {
params.tid = row.id; params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name; let materialname = row.material_.name + '|' + row.material_.process_name;
let specification = row.material_.specification; let specification = row.material_.specification;
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'){ if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='tuomoceliang'){
console.log('route_code',that.route_code); console.log('route_code',that.route_code);
params.label_template_name = '工序带板段号打印模板'; params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','','']; let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length; let leng = res.length;
@ -601,6 +602,7 @@ export default {
} }
} }
if(leng>0){ if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3; let nums = leng/3;
for(let i=0;i<nums;i++){ for(let i=0;i<nums;i++){
let index = i*3; let index = i*3;
@ -613,7 +615,7 @@ export default {
} }
} }
} }
params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]}; params.extra_data={orimaterial:row.material_ofrom_name,materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,totalcount:totalcount,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
that.apiObjPrint.req(params).then((res) => { that.apiObjPrint.req(params).then((res) => {
let obj = {}; let obj = {};
obj.printer_commands = res.commands; obj.printer_commands = res.commands;

View File

@ -57,12 +57,18 @@
<span v-if="!row.isEdit || !item.canEdit">{{ row[item.testitem_name] }}</span> <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" <input v-if="item.testitem_field_type == 'input-number' && row.isEdit && item.canEdit"
type="number" v-model="row[item.testitem_name]" @change="defectCountSun(row)"> 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" <input v-if="item.testitem_field_type == 'input-text' && row.isEdit && item.canEdit"
type="text" v-model="row[item.testitem_name]" @change="defectCountSun(row)"> type="text" v-model="row[item.testitem_name]" @change="defectCountSun(row)">
<select v-if="item.testitem_field_type == 'select-text' && row.isEdit && item.canEdit" <select v-if="item.testitem_field_type == 'select-text' && row.isEdit && item.canEdit"
v-model="row[item.testitem_name]" @change="defectCountSun(row)"> v-model="row[item.testitem_name]" @change="defectCountSun(row)">
<option v-for="item0 in item.testitem_choices" :key="item0" :value="item0">{{ item0 }}</option> <option v-for="item0 in item.testitem_choices" :key="item0" :value="item0">{{ item0 }}</option>
</select> </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>
<td class="w_80 inlineBlock padding_4 defectBlock" v-for="item in qct_defects" :key="item.id"> <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)"> <input type="checkbox" :disabled="!row.isEdit || !item.canEdit" v-model="row[item.defect_name]" @change="switchChange(row, item,index)">