chencc 1 anno fa
parent
commit
46516570fb

+ 6 - 6
pages/pda/components/bottomOperate.vue

@@ -44,12 +44,12 @@
 				<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
 			</view>
 
-			<view v-if="newTaskObj.existOutsource == 1" class="list rx-bc"
+			<!-- <view v-if="newTaskObj.existOutsource == 1" class="list rx-bc"
 				@click="operate('jobBooking', { isOutsource: 1 })">
 				<view class="round">{{ btnList[btnState].length + 2 }}</view>
 				<view class="name">委外报工</view>
 				<image class="arrow_right" src="~@/static/pda/arrow_right.svg"></image>
-			</view>
+			</view> -->
 
 
 
@@ -110,11 +110,11 @@
 
 						<u-form-item label="直接入库:" borderBottom prop="isInWarehouse"
 							v-if="outsourceForm.isFirstTask != 1">
-							<u-checkbox-group v-model="isInWarehouse" size="15px" v-if="clientEnvironmentId != 2">
+							<!-- <u-checkbox-group v-model="isInWarehouse" size="15px" v-if="clientEnvironmentId != 2" >
 								<u-checkbox labelSize="15px" iconSize="10px" activeColor="#157A2C" name="true"
-									label="是"></u-checkbox>
+									label="是" disabled></u-checkbox>
 							</u-checkbox-group>
-							<view style="font-size: 15px;" v-if="clientEnvironmentId == 2">是</view>
+							<view style="font-size: 15px;" v-if="clientEnvironmentId == 2">是</view> -->
 
 
 							<zxz-uni-data-select style="margin-left: 10px; font-size: 15px;"
@@ -481,7 +481,7 @@ export default {
 
 			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
-			isInWarehouse: []
+			isInWarehouse: [1]
 
 
 

+ 2 - 4
pages/pda/feeding/components/workOrderBom.vue

@@ -63,15 +63,13 @@
 			</view>
 		</view>
 
-
-
 		<view class="title_box mt20 rx-bc"
-			v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && taskType == 1 && (pType == 'feed' || pType == 'job')">
+			v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) &&  (pType == 'feed' || pType == 'job')">
 			<view class="name">{{ pType == 'feed' ? '实际投料时间' : '实际报工时间' }} </view>
 		</view>
 
 		<view class="material "
-			v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && taskType == 1 && (pType == 'feed' || pType == 'job')">
+			v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && (pType == 'feed' || pType == 'job')">
 
 			<view class="content_table">
 				<view class="item">

+ 17 - 8
pages/pda/feeding/details.vue

@@ -7,7 +7,7 @@
 			<u-list @scrolltolower="scrolltolower">
 				<view v-for="(item, index) in List" :key="index" class="card_box">
 					<!-- 工单信息 -->
-					
+
 					<workOrderBom :item='item' pType="feed" :taskType="item.currentTaskDiagram.type"
 						@handleScan='handleScan'></workOrderBom>
 
@@ -35,7 +35,7 @@
 						:list='item.instanceList' :equipmentList="item.equipmentList"
 						:currentTaskDiagram="item.currentTaskDiagram" :workInfo="item">
 					</instanceBom>
-
+					<!-- 物料明细 -->
 
 					<semiProductBom v-if='item.semiProductList.length != 0' :workOrderId='item.workOrderId'
 						:list='item.semiProductList' :equipmentList="item.equipmentList"
@@ -122,12 +122,11 @@ import {
 	removeCache
 } from '@/api/pda/workOrder.js'
 
+
 import {
 	batchSave
 } from '@/api/pda/feeding.js'
 
-
-
 export default {
 	components: {
 		workOrderBom,
@@ -159,14 +158,16 @@ export default {
 	},
 	onLoad(options) {
 
+
+
 		this.title = options.taskName ? options.taskName + '-投料' : '投料'
 		let queryArray = decodeURIComponent(options.arr);
 		this.idsList = JSON.parse(queryArray);
-
 		this.taskId = options.taskId;
 		this.taskName = options.taskName;
 		this.type = options.type;
 
+		console.log(this.idsList, 'onLoad');
 
 		this.getList()
 
@@ -339,10 +340,18 @@ export default {
 			}
 
 			batchSave(this.List).then(res => {
+				// 江南环境
+				if (this.clientEnvironmentId == 9) {
+					uni.redirectTo({
+						url: `/pages/pda/workOrder/extrusionMolding/index?id=${this.idsList}`,
+					});
 
-				uni.redirectTo({
-					url: `/pages/pda/feeding/index/index?feedStatus=1`,
-				});
+				} else {
+					uni.redirectTo({
+						url: `/pages/pda/feeding/index/index?feedStatus=1`,
+					});
+
+				}
 
 			})
 		},

+ 1 - 1
pages/pda/jobBooking/components/jobBom.vue

@@ -113,7 +113,7 @@
 						</view>
 					</view>
 					<!-- v-if="clientEnvironmentId==2" -->
-					<view class="rx ww45 " >
+					<view class="rx ww45 " v-if="clientEnvironmentId==2">
 						<view class="lable ww80 rx-cc ">批次号</view>
 						<view class="content content_num" style="width: 100%;">
 							{{ item.batchNo }}

+ 12 - 12
pages/pda/jobBooking/components/oneJobQualityBom.vue

@@ -3,7 +3,7 @@
 		<view class="title_box rx-bc">
 			<view class="name">报工信息: ({{list.length || 0}})个</view>
 		</view>
-
+	
 
 		<view class="material " v-for="(it, idx) in list" :key="idx">
 
@@ -145,7 +145,7 @@
 						<view class="content  content_num">
 							<zxz-uni-data-select :localdata="notTypeList" v-model="it.extInfo.notType" dataValue='code'
 								format='{name}' dataKey="code" filterable :disabled="isDetails"
-								:clear='false'></zxz-uni-data-select>
+								:clear='false' @change="changeFn(it.extInfo)"></zxz-uni-data-select>
 						</view>
 					</view>
 				</view>
@@ -400,33 +400,33 @@
 				
 				
 				isQualifiedList: [{
-						code: '1',
+						code: 1,
 						name: '合格'
 					},
 					{
-						code: '2',
+						code: 2,
 						name: '不合格'
 					}
 				],
 				
 				notTypeList: [{
-						code: "1",
+						code: 1,
 						name: '返工'
 					},
 					{
-						code: "2",
+						code: 2,
 						name: '返修'
 					},
 					{
-						code: "3",
+						code: 3,
 						name: '报废'
 					},
 					{
-						code: '4',
+						code: 4,
 						name: '降级使用'
 					},
 					{
-						code: "5",
+						code: 5,
 						name: '让步接收'
 					}
 				]
@@ -446,9 +446,7 @@
 
 		},
 		methods: {
-
-
-
+			
 
 			getSteps() {
 
@@ -594,6 +592,8 @@
 			save() {
 
 
+				console.log(this.list,'888888888');
+	
 				if (this.isFirstTask == 1) {
 
 					this.resultObj = {}

+ 67 - 2
pages/pda/jobBooking/components/oneJobQualityBomPL.vue

@@ -5,7 +5,6 @@
 			<view class="name">产品信息</view>
 		</view>
 
-
 		<view class="material " v-for="(it, idx) in list" :key="idx">
 
 
@@ -383,8 +382,71 @@
 
 			</view>
 
+			<view class="content_table2" v-if="it.extInfo.notBatchReportInfo&&it.extInfo.notBatchReportInfo.length > 0">
+				<view class="head row rx-sc">
+					<view class="item ww15" style="font-size: 20rpx;">
+						不合格数
+					</view>
+					
+					<view class="item ww15" style="font-size: 20rpx;">
+						重量
+					</view>
+					
+					<view class="item ww35">类型</view>
+
+					<view class="item ww35 rx-bc">
+						<text>处置/原因</text>
+						<image v-if='!isDetails' class="icon" @click="handAddListPL4(it, idx)"
+							src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
+					</view>
+					
+				</view>
+
+				<view class="table">
+					<view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.notBatchReportInfo" :key="'not'+ idx + yyIdx">
+
+						<view class="item ww15 content_num">
+							<view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
+							<input class="uni-input" v-else v-model="yy.allFeedQuantity"
+								@input="blurNum2($event,idx, yyIdx)" type='number'></input>
+						</view>
+						
+						<view class="item ww15 content_num">
+							<view v-if='isDetails'>{{yy.allReportWeight }}</view>
+							<input class="uni-input" v-else v-model="yy.allReportWeight"
+								 type='number'></input>
+						</view>
+						
+						<view class="item ww35 content_num">
+							<zxz-uni-data-select :localdata="notTypeList" v-model="yy.notType" dataValue='code'
+								format='{name}' dataKey="code" filterable :disabled="isDetails" @change="handLoad()"
+								:clear='false'></zxz-uni-data-select>
+						</view>
 
 
+
+						<view class="item ww35" v-if='isDetails'>
+							{{ yy.notType == 5 ? yy.taskName : yy.notReason}}
+						</view>
+
+
+<!-- 
+						<view class="item ww35 content_num" v-if="!isDetails && yy.notType != 5">
+							<input class="uni-input" v-if="yy.notType != 5 " v-model="yy.notReason"></input>
+						</view> -->
+<!-- 
+						<view class="item ww10">
+							<uni-icons v-if='!isDetails' custom-prefix="iconfont" type="icon-shanchu" size="16"
+								@click="handDel4(idx, yyIdx)" color="#fa3534"></uni-icons>
+						</view> -->
+
+
+					</view>
+
+				</view>
+
+			</view>
+
 			<view v-if="it.extInfo.batchReportInfo.length == 0">
 
 				<view class="content_table2">
@@ -602,6 +664,7 @@
 
 			handSample() {
 
+				console.log(this.list[0],'9999999999999999');
 
 
 				let param = {
@@ -820,7 +883,9 @@
 			.ww25 {
 				width: 25%;
 			}
-
+			.ww35 {
+				width: 35%;
+			}
 			.ww50 {
 				width: 50%;
 			}

+ 13 - 7
pages/pda/jobBooking/components/packingTgBom.vue

@@ -5,7 +5,8 @@
 		</view>
 
 		<view class="material " v-for="(it, idx) in isWarehousing ? list :  item.pickOutInList" :key="idx">
-   	
+			
+			
 
 			<view class="content_table" >
 
@@ -42,11 +43,12 @@
 
 
 				<view class="item rx-sc" v-if="item.singleReport == 1">
+
 					<view class="rx ww50 ">
 						<view class="lable lable150 rx-cc ">物料代号</view>
 						<view class="content content_num">
 							<view v-if='isDetails'>{{it.extInfo.materielCode }}</view>
-							<input class="uni-input" v-else v-model="it.extInfo.materielCode"></input>
+							<input class="uni-input" v-else v-model="it.extInfo.materielCode" :disabled="objData.currentTaskDiagram.type==5"></input>
 
 						</view>
 					</view>
@@ -55,7 +57,7 @@
 						<view class="lable lable150 rx-cc ">客户代号</view>
 						<view class="content content_num">
 							<view v-if='isDetails'>{{it.extInfo.clientCode }}</view>
-							<input class="uni-input" v-else v-model="it.extInfo.clientCode"></input>
+							<input class="uni-input" v-else v-model="it.extInfo.clientCode" :disabled="objData.currentTaskDiagram.type==5"></input>
 						</view>
 					</view>
 
@@ -65,11 +67,12 @@
        
 
 				<view class="item rx-sc" v-if="item.singleReport == 1">
+
 					<view class="rx ww50 ">
 						<view class="lable lable150 rx-cc ">刻码</view>
 						<view class="content content_num ">
 							<view v-if='isDetails'>{{it.extInfo.engrave }}</view>
-							<input class="uni-input" v-else v-model="it.extInfo.engrave"></input>
+							<input class="uni-input" v-else v-model="it.extInfo.engrave" :disabled="objData.currentTaskDiagram.type==5"></input>
 
 						</view>
 					</view>
@@ -190,7 +193,10 @@
 				type: Object,
 				default: () => {}
 			},
-
+			objData:{
+				type: Object,
+				default: () => {}
+			},
 			list: {
 				type: Array,
 				default: () => []
@@ -245,13 +251,13 @@
 		},
 		created() {
 
-
+			console.log(this.objData, 'item333');
 
 
 		},
 		methods: {
 
-
+			
 
 
 

+ 10 - 7
pages/pda/jobBooking/index/index.vue

@@ -9,8 +9,8 @@
 			<u-list @scrolltolower="scrolltolower">
 				<view class="card_box">
 					<!-- 工单信息 objData 报告信息-->
-					
-					<workOrderBom :item='objData' pType="job" v-if='objData' :taskType="taskType"
+							
+					<workOrderBom :item='objData'  v-if='objData' :taskType="taskType"
 						@handleScan='handleScan'></workOrderBom>
 					<paramBom v-if='paramDetailList.length != 0' :list='paramDetailList'></paramBom>
 
@@ -23,7 +23,8 @@
 						ref='modelRef'>
 					</modelBom>
 
-					<!-- 报工信息 -->
+					<!-- 1报工信息 -->
+					
 					<jobBom v-if='isLoad' :item='objData' ref='jobRef' :notFormed='objData.notFormedList'
 						@penalize='penalize' @modeNum='modeNum'></jobBom>
 
@@ -37,6 +38,7 @@
 						:item='objData' :list='objData.instanceList'>
 					</oneJobBom> -->
 
+					<!-- 报工信息 列表 -->
 					<semiProductJobBom
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType != 4 && taskType != 6 && objData.singleReport == 1'
 						:item='objData' :list='objData.semiProductList' :equipmentList="objData.equipmentList">
@@ -48,7 +50,7 @@
 						:item='objData' :list='objData.semiProductList' :equipmentList="objData.equipmentList">
 					</semiProductJobBomPL>
 
-					<oneJobQualityBom
+				<oneJobQualityBom
 						v-if='objData.semiProductList && objData.semiProductList.length != 0 && taskType == 6 && clientEnvironmentId == 3 && objData.singleReport == 1'
 						:item='objData' :list='objData.semiProductList'></oneJobQualityBom>
 
@@ -77,10 +79,10 @@
 							v-if='taskType == 4 && clientEnvironmentId != 3 && objData' :categoryId="categoryId"></packingBom>
 					</view>
 					
-
+					<!-- 碳谷 包装扫码  -->
 					<packingTgBom
 						v-if='objData.pickOutInList && objData.pickOutInList.length != 0 && taskType == 4 && clientEnvironmentId == 3'
-						:list='objData.pickOutInList' :item='objData' ></packingTgBom>
+						:list='objData.pickOutInList' :objData="objData" :item='objData' ></packingTgBom>
 
 
 					<view class="operate_box rx-sc">
@@ -772,7 +774,8 @@ export default {
 
 
 
-
+			//
+			// console.log(this.objData.currentTaskDiagram.isFirstTask,'22222');
 			if (this.objData.currentTaskDiagram.isFirstTask == 0) { // isFirstTask  1是  判断是否首工序
 
 				const isFirstTask = await this.checkFirstTask()

+ 32 - 12
pages/pda/picking/details.vue

@@ -14,7 +14,7 @@
 							<view class="code">工单编号:{{ item.code }}</view>
 						</view>
 
-						<view class="right_box rx-ec">
+						<view class="right_box rx-ec" v-if="clientEnvironmentId!==9">
 							<u-button type="success" size="small" class="u-reset-button" v-if="isOutsource == 0"
 								@click="addPicking(item.workOrderId, item)" text="添加物料"></u-button>
 
@@ -50,7 +50,7 @@
 								<view class="rx ww45">
 									<view class="lable rx-cc ww80">数量</view>
 									<view class="content content_num">
-										<input class="uni-input" v-model="mate.demandQuantity" type="digit"></input>
+										<input class="uni-input" v-model="mate.demandQuantity" type="digit" :disabled="clientEnvironmentId==9"></input>
 										<view class="unit">{{ mate.unit }}</view>
 
 									</view>
@@ -67,7 +67,10 @@
 										:clear='false'></zxz-uni-data-select>
 								</view>
 							</view>
-
+							<view class="item" v-if="clientEnvironmentId==21">
+								<view class="lable rx-cc">库存可用量</view>
+								<view class="content ">{{ mate.waitOutInWeight }}</view>
+							</view>
 						</view>
 					</view>
 
@@ -136,6 +139,9 @@ import {
 	listOutsourceInWarehouse,
 	listOutsource
 } from '@/api/pda/workOrder.js'
+import {
+	VirtualPagination
+} from '@/utils/pages.js'
 
 import {
 	batchSave,
@@ -156,9 +162,9 @@ export default {
 		return {
 			idsList: [],
 			List: [],
-
+			pagination:{},
 			classificationList: [], //分类数据
-
+			newList:[],
 			taskId: null,
 			isPick: false,
 			isOutsource: 0,
@@ -169,7 +175,7 @@ export default {
 		}
 	},
 	onLoad(options) {
-
+		console.log(options,'1111111111');
 
 		let queryArray = decodeURIComponent(options.arr);
 
@@ -262,13 +268,21 @@ export default {
 	},
 
 	methods: {
-		scrolltolower() { },
+		scrolltolower() { 
+
+			let arr = this.pagination.nextPage();
+			if(arr.length){
+				this.List[0].bomList = [...this.List[0].bomList, ...arr]
+			}
+	
+
+		},
 
 		save() {
 
 
 			let _arr = []
-			_arr = this.List.map(m => {
+			_arr = this.newList.map(m => {
 
 				if (m.bomList.length > 0) {
 					let bomList = m.bomList.filter(f => f.checked)
@@ -282,9 +296,8 @@ export default {
 					...m
 				}
 			})
-			console.log(this.clientEnvironmentId,'this.clientEnvironmentId');
+
 			if (this.clientEnvironmentId == 21) {
-				console.log(1111111111111111111);
 
 				findVoucherList({workOrderId:this.idsList[0]}).then(res => {
 					uni.navigateTo({
@@ -313,7 +326,7 @@ export default {
 			}).then(res => {
 				console.log(res, 'res');
 				if (res?.length) {
-					this.List = res.map(m => {
+					let List = res.map(m => {
 						m.workOrderId = m.id
 						let modelList = []
 						let palletList = []
@@ -358,7 +371,14 @@ export default {
 						}
 					})
 
-					console.log(this.List,'1111111111111111');
+					this.newList =JSON.parse(JSON.stringify(List));
+
+					this.pagination = new VirtualPagination(List[0].bomList, 10);
+		
+					List[0].bomList = this.pagination.getCurrentPageData();
+
+					this.List = List;
+
 				}
 
 

+ 4 - 4
pages/pda/warehousing/index.vue

@@ -8,10 +8,10 @@
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
 				<view class="card_box">
-					<workOrderBom :item='objData' v-if='objData' @handleScan='handleScan'></workOrderBom>
+					<workOrderBom :item='objData' v-if='objData' pType="job" @handleScan='handleScan'></workOrderBom>
 
 					<jobBom v-if="clientEnvironmentId == 2" :item='objData' ref='jobRef'
-						:notFormed='objData.notFormedList' @penalize='penalize' @modeNum='modeNum'></jobBom>
+						:notFormed='objData.notFormedList' pType="job" @penalize='penalize' @modeNum='modeNum'></jobBom>
 
 					<view class="select_box">
 						<zxz-uni-data-select :localdata="warehouseList" placeholder="请选择入库仓库" v-model="warehouseId"
@@ -29,10 +29,10 @@
 						<packingBom :objData="item.extInfo" :measuringUnit='item.measuringUnit'></packingBom>
 					</view>
 
-
+					<!-- 打包信息 -->
 					<view class="list_box" v-for="(it, index) in tgList" :key="index" v-if="clientEnvironmentId == 3">
 						<view class="time">打包时间: {{ it.createTime }}</view>
-						<packingTgBom :list='it.extInfo.pickOutInList' :isWarehousing='true' :item='it'></packingTgBom>
+						<packingTgBom  :list='it.extInfo.pickOutInList' :isWarehousing='true' :item='it' :objData="objData"></packingTgBom>
 					</view>
 
 

+ 8 - 1
pages/pda/workOrder/extrusionMolding/index.vue

@@ -281,6 +281,8 @@
 			getSteps() {
 				getTaskInstanceList(this.id).then(res => {
 
+					console.log(res,'555555555555555555555555');
+
 					// for(let i = 0; i < res.length; i++) {
 					// 	if(res[i].taskTypeName == '自然干燥' ||res[i].taskTypeName == '升温干燥') {
 					// 		res[i - 1].btns = [ { name: '更换周转车', type: 'turnover'}]
@@ -302,7 +304,7 @@
 
 			getInfo() {
 				workorderInfo(this.id).then(res => {
-					console.log(res)
+					console.log(res,99999999999)
 					this.info = res
 					this.taskId = res.taskId
 					this.setTypeFn()
@@ -315,7 +317,9 @@
 			},
 			setTypeFn() {
 				this.stepsList.length && this.stepsList.find(f => {
+
 					let id = this.currentTaskId || this.taskId
+
 					if (f.taskId == id) {
 						this.currentType = f.type,
 							this.existOutsource = f.existOutsource
@@ -327,6 +331,8 @@
 			},
 
 			feedStatus() {
+				console.log(this.currentTaskId,this.taskId,'111111111111');
+
 				let taskId = this.currentTaskId || this.taskId
 				checkStatus(this.id, taskId).then(res => {
 					this.feedAllow = res
@@ -346,6 +352,7 @@
 				this.feedStatus()
 			},
 
+			// 点击之后调用事件
 			operate(type, item) {
 				console.log(4444, type,item)
 

+ 2 - 0
utils/common.js

@@ -425,3 +425,5 @@ export function isJobExls(type, data) {
     });
   }
 }
+
+

+ 63 - 0
utils/pages.js

@@ -0,0 +1,63 @@
+class VirtualPagination {
+    constructor(data, itemsPerPage = 10) {
+        console.log(data);
+      this.originalData = data;
+      this.currentData = [...data];
+      this.itemsPerPage = itemsPerPage;
+      this.currentPage = 1;
+      this.totalPages = Math.ceil(data.length / itemsPerPage);
+    }
+
+    // 获取当前页数据
+    getCurrentPageData() {
+      const start = (this.currentPage - 1) * this.itemsPerPage;
+      const end = start + this.itemsPerPage;
+
+      return this.currentData.slice(start, end);
+    }
+
+    // 跳转到指定页
+    goToPage(page) {
+        console.log(page,'this.totalPages',this.totalPages);
+      if (page >= 1 && page <= this.totalPages) {
+        this.currentPage = page;
+        return this.getCurrentPageData();
+      }else{
+        return;
+      }
+      
+    }
+
+    // 上一页
+    prevPage() {
+      return this.goToPage(this.currentPage - 1);
+    }
+
+    // 下一页
+    nextPage() {
+      return this.goToPage(this.currentPage + 1);
+    }
+
+    // 设置每页显示数量
+    setItemsPerPage(count) {
+      this.itemsPerPage = count;
+      this.totalPages = Math.ceil(this.currentData.length / count);
+      this.currentPage = 1; // 重置到第一页
+    }
+
+    // 过滤数据
+    filterData(filterFn) {
+      this.currentData = this.originalData.filter(filterFn);
+      this.totalPages = Math.ceil(this.currentData.length / this.itemsPerPage);
+      this.currentPage = 1; // 重置到第一页
+      return this.getCurrentPageData();
+    }
+
+    // 排序数据
+    sortData(compareFn) {
+      this.currentData = [...this.originalData].sort(compareFn);
+      return this.getCurrentPageData();
+    }
+  }
+
+  export { VirtualPagination };