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");
Cesium = await import('cesium');
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1Yzg3ZDEzOS0zN2Q1LTQ2N2YtOWJhMy1mNWU4MWY5N2ExYzkiLCJpZCI6MjAxMzIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzY4MTIzNzR9.SfNeHedDyXWLIPiNbc4qSsHBACm7uvaqRsQprL2J4Cw";
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MjJiNDIxZS0wM2QzLTQ4ZDAtODI3Ny1lOWM5M2NlMDY3MDIiLCJpZCI6MzY3OTI4LCJpYXQiOjE3NjUyNjU3NDN9.DQPVOi6Iyre4L2pSEowtWydgX3EYPbBmkzQgeC-FTa4";
}
export default {
name: "cesium",

View File

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

View File

@ -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 : 50,
state_all: 1
state_all: 1,
mgroup:"",
},
dialog: {
save: false,
@ -119,6 +128,7 @@ export default {
query:{
search:''
},
selectiones: [],
type:20,
mgroupName:'废品库',
mgroupId:'',
@ -128,26 +138,26 @@ export default {
let that = this;
that.route_code = that.$route.path.split("/")[2];
if(that.route_code=='scrap'){
that.params.material__type__in = 30;
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) {

View File

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

View File

@ -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: {

View File

@ -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 = {

View File

@ -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"

View File

@ -557,9 +557,10 @@ export default {
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
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 = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
@ -571,6 +572,7 @@ export default {
}
}
if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3;
for(let i=0;i<nums;i++){
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) => {
let obj = {};
obj.printer_commands = res.commands;

View File

@ -586,10 +586,11 @@ export default {
params.tid = row.id;
let materialname = row.material_.name + '|' + row.material_.process_name;
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);
params.label_template_name = '工序带板段号打印模板';
that.wprParams.wm = row.id;
let totalcount = 0;
let numbers = ['','','','','','',''];
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
let leng = res.length;
@ -601,6 +602,7 @@ export default {
}
}
if(leng>0){
totalcount = leng*slice_count;
let nums = leng/3;
for(let i=0;i<nums;i++){
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) => {
let obj = {};
obj.printer_commands = res.commands;

View File

@ -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)">