ysy 2 anni fa
parent
commit
485a9bcd51

+ 64 - 1
api/pda/workOrder.js

@@ -153,7 +153,7 @@ export async function pageeLedgerMain(params) {
 	return Promise.reject(data.message);
 }
 
-// 
+// 资产
 export async function assetPage(params) {
 	const data = await get(
 		Vue.prototype.apiUrl + `/main/asset/pdaPage`, params, true,
@@ -164,6 +164,69 @@ export async function assetPage(params) {
 	return Promise.reject(data.message);
 }
 
+
+// 库存台账 (包装  dimension 3)
+export async function getInventoryDetails(params) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/wms/outin/getInventoryDetails`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+
+// 库存台账 (物料  dimension 4)
+export async function getMaterielDetails(params) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/wms/outin/getMaterielDetails`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+// 在制品
+export async function listInProduct(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/feed/listInProduct`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+// 根据工单查委外入库信息
+export async function listOutsourceInWarehouse(params) {
+	const data = await get(
+		Vue.prototype.apiUrl + `//mes/applyoutsource/listOutsourceInWarehouse`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+
+// pda委外完成的  领料保存到工序(半成品)
+
+export async function outsourceEndPick(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/pickorder/outsourceEndPick`, params, true,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}
+
+
+
+
+
 // 库存台账
 
 export async function realTimeInventory(params) {

+ 2 - 2
pages/pda/feeding/components/instanceBom.vue

@@ -12,8 +12,8 @@
 					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 				</view>
 				<view class="content_table">
-
-
+                   
+              
 					<view class="item rx-sc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 1'>
 						<view class="rx ww50">
 							<view class="lable rx-cc">编码</view>

+ 9 - 4
pages/pda/feeding/details.vue

@@ -162,7 +162,7 @@
 						let palletList = [] // 舟皿
 						let revolvingDiskList = [] // 周转盘
 						let semiProductList = [] // 半成品
-
+                        let productionList = [] // 在制品
 
 						selectList.forEach(f => {
 							if (f.rootCategoryLevelId == 4) {
@@ -175,16 +175,20 @@
 							} else if (f.rootCategoryLevelId == 1) {
 								instanceList = instanceList.concat(f)
 
-							} else if (f.rootCategoryLevelId == 11) {
+							}  else if (f.rootCategoryLevelId == 2) {
+								productionList = productionList.concat(f)
+							} 
+							
+							else if (f.rootCategoryLevelId == 11) {
 								aridRegionList = aridRegionList.concat(f)
 							} else if (f.rootCategoryLevelId == 8) {
 								palletList = palletList.concat(f)
 							} else if (f.rootCategoryLevelId == 26) {
 								revolvingDiskList = revolvingDiskList.concat(f)
-							}else if (f.rootCategoryLevelId == 23) {
+							} else if (f.rootCategoryLevelId == 23) {
 								semiProductList = semiProductList.concat(f)
 							}
-							
+
 
 
 
@@ -274,6 +278,7 @@
 						m.palletList = [] // 舟皿
 						m.revolvingDiskList = [] // 周转盘
 						m.semiProductList = [] //半成品
+						m.productionList = [] // 在制品
 
 						if (m.pickOutInList.length > 0) {
 							m.pickOutInList.forEach(f => {

+ 32 - 20
pages/pda/picking/components/semiProductBom.vue

@@ -14,10 +14,7 @@
 					</view>
 				</view>
 
-				<view class="item">
-					<view class="lable rx-cc">名称</view>
-					<view class="content">{{mate.name}} ({{mate.categoryLevelPath}})</view>
-				</view>
+			
 
 
 				<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" v-if='itm.prop' :key="index">
@@ -26,29 +23,44 @@
 
 				</view>
 				
-				<view class="item">
-					<view class="lable rx-cc">包装库存</view>
-					<view class="content">{{mate.packingCountBase}}/ {{mate.minUnit}}</view>
-				</view>
+	
 
 
-				<view class="item">
-					<view class="lable rx-cc">领料数量</view>
-					<view class="content content_num">
-						<input class="uni-input" v-model="mate.demandQuantity"
-							@blur='mate.demandQuantity > mate.availableCountBase ?  mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
-							type="number"></input>
-						<view class="unit">/{{mate.measuringUnit}}</view>
-						<view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }} {{mate.measuringUnit}})</view>
-					</view>
-				</view>
 
+				<!-- 				<view class="items"
+									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
+									<text></text>{{item.extInfo. }}
+								</view>
+
+
+								<view class="items"
+									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
+									<text>客户代号</text>{{item.extInfo.clientCode }}
+								</view> -->
 
 
+
+				<view class="item">
+					<view class="lable rx-cc">刻码</view>
+					<view class="content ">
+				     {{mate.extInfo.engrave }}
+					</view>
+				</view>
+				
+				
+				<view class="item">
+					<view class="lable rx-cc">物料代号</view>
+					<view class="content ">
+				     {{mate.extInfo.materielCode }}
+					</view>
+				</view>
+				
+		
+				
 				<view class="item">
-					<view class="lable rx-cc">领料仓库</view>
+					<view class="lable rx-cc">客户代号</view>
 					<view class="content ">
-						{{ mate.pathName }}
+				     {{mate.extInfo.clientCode }}
 					</view>
 				</view>
 

+ 131 - 31
pages/pda/workOrder/search/index.vue

@@ -32,7 +32,7 @@
 
 						<view class="listBox-sel">
 							<checkbox
-								v-if='item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1)'
+								v-if='item.rootCategoryLevelId != 23 && (item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1))'
 								:value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
 						</view>
 
@@ -53,10 +53,31 @@
 
 
 								<view class="items"
-									v-if='item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4 '>
+									v-if='(item.rootCategoryLevelId == 1 && item.isConsumable == 1) &&  item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4 '>
 									<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
 								</view>
 
+
+								<view class="items"
+									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
+									<text>刻码</text>{{item.extInfo.engrave }}
+								</view>
+
+
+								<view class="items"
+									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
+									<text>物料代号</text>{{item.extInfo.materielCode }}
+								</view>
+
+
+								<view class="items"
+									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
+									<text>客户代号</text>{{item.extInfo.clientCode }}
+								</view>
+
+
+
+
 								<view class="items" v-if=' item.rootCategoryLevelId == 4 '>
 									<text>状态</text>{{ stateList[Number(item.runStatus)] }}
 								</view>
@@ -105,7 +126,7 @@
 		</view>
 
 
-		<view class="bottom-wrapper rx-bc">
+		<view class="bottom-wrapper rx-bc" v-if='rootCategoryLevelId != 23'>
 			<view>
 				<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
 				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
@@ -118,6 +139,19 @@
 			</view>
 		</view>
 
+		<view class="bottom-wrapper rx-bc" v-if='rootCategoryLevelId == 23'>
+			<view>
+
+			</view>
+			<view>
+				<u-button type="success" size="small" class="u-reset-button" @click="jumpBCPAdd">
+					<view> 确认 </view>
+				</u-button>
+			</view>
+		</view>
+
+
+
 		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
 			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
 
@@ -135,15 +169,24 @@
 							<zxz-uni-data-select :localdata="warehouseList" v-model="formData.warehouseId"
 								dataValue='id' format='{name}' dataKey="name" filterable></zxz-uni-data-select>
 						</u-form-item>
-						
-						
-						<u-form-item label="维度:" class="required-form" borderBottom prop="warehouseId">
-						
-							<zxz-uni-data-select :localdata="dimensionList" v-model="formData.dimension"
-								dataValue='id' format='{name}' dataKey="name" filterable></zxz-uni-data-select>
+
+
+						<u-form-item label="维度:" v-if="isType == 'feed'" class="required-form" borderBottom
+							prop="warehouseId">
+
+							<zxz-uni-data-select :localdata="dimensionList" v-model="formData.dimension" dataValue='id'
+								format='{name}' dataKey="name" filterable></zxz-uni-data-select>
 						</u-form-item>
-						
-						
+
+
+
+
+
+
+
+
+
+
 
 					</u-form>
 
@@ -178,7 +221,12 @@
 		treeByPid,
 		pageeLedgerMain,
 		assetPage,
-		getWarehouseList
+		getWarehouseList,
+		getInventoryDetails,
+		getMaterielDetails,
+		listInProduct,
+		listOutsourceInWarehouse,
+		outsourceEndPick
 	} from '@/api/pda/workOrder.js'
 
 
@@ -213,7 +261,9 @@
 				storageKey: null,
 
 				formData: {
-					produceRoutingId: ''
+					produceRoutingId: '',
+					dimension: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+						.clientEnvironmentId == 3 ? 4 : 3
 				},
 				warehouseList: [],
 
@@ -221,10 +271,9 @@
 
 				stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
 				classIds: [],
-				
-				
-				dimensionList: [
-					{
+
+
+				dimensionList: [{
 						id: 3,
 						name: '包装维度'
 					},
@@ -232,7 +281,11 @@
 						id: 4,
 						name: '物料维度'
 					}
-				]
+				],
+
+
+				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
 
 
@@ -284,17 +337,15 @@
 						this.memoList = this.memoList.concat(_obj.equipmentList)
 					}
 
-				}
-				
-				else if (this.isType == 'zdy') {
+				} else if (this.isType == 'zdy') {
 					let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
-				
+
 					if (Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
 						this.memoList = this.memoList.concat(_arr[0].turnover)
 					} else if (Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
 						this.memoList = this.memoList.concat(_arr[0].equipmentList)
 					}
-				
+
 				}
 
 
@@ -356,14 +407,14 @@
 			getTreeList() {
 				let params = {}
 				if (this.isType == 'feed') {
-					params.ids = [1, 4, 5, 8, 10, 11, 13, 14, 23, 26]
+					params.ids = [1, 2, 4, 5, 8, 10, 11, 13, 14, 26]
 				} else if (this.isType == 'pick') {
 					params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
 				} else if (this.isType == 'job') {
 					params['ids'] = [4, 7]
-				}  else if (this.isType == 'zdy') {
-					params['ids'] =  JSON.parse(this.classIds);
-				} 
+				} else if (this.isType == 'zdy') {
+					params['ids'] = JSON.parse(this.classIds);
+				}
 
 				treeByPid(params).then(res => {
 					this.classificationList = res
@@ -408,11 +459,37 @@
 				isEnd = false
 				let URL = null
 				if (this.isType == 'pick') { // 领料
-					param.dimension = 1
-					// URL = this.rootCategoryLevelId == 1 ? pageeLedgerMain : assetPage
-					URL = pageeLedgerMain
+					if (this.rootCategoryLevelId == 23) {
+						param = {}
+						param.workOrderId = this.pid
+						URL = listOutsourceInWarehouse
+					} else {
+						param.dimension = 1
+						URL = pageeLedgerMain
+					}
 				} else if (this.isType == 'feed') { // 投料
-					URL = assetPage
+
+					if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+						
+						URL = assetPage
+					} else if (this.rootCategoryLevelId == 2) {
+						param.workOrderId = this.pid
+						delete param.taskId
+						delete param.categoryLevelId
+						URL = listInProduct
+					} else if (![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+							URL = assetPage
+						// if (this.formData.dimension == 3) { // 包装维度
+						// 	URL = getInventoryDetails
+						// 	param.dimension = 3
+						// 	param.rootCategoryLevelId = this.rootCategoryLevelId
+						// } else if (this.formData.dimension == 4) { // 物料维度
+						// 	param.dimension = 4
+						// 	param.rootCategoryLevelId = this.rootCategoryLevelId
+						// 	URL = getMaterielDetails
+						// }
+					}
+
 				} else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
 					URL = assetPage
 				}
@@ -515,6 +592,29 @@
 
 			},
 
+			jumpBCPAdd() {
+				uni.showModal({
+					title: '提示',
+					content: '是否领取该工单半成品到此工序!',
+					confirmText: '确认', //这块是确定按钮的文字
+					success: rr => {
+						if (rr.confirm) {
+							let param = {
+								taskId: this.taskId,
+								workOrderId: this.pid
+							}
+							uni.$emit('setSelectList', this.list, this.pid)
+							uni.navigateBack()
+							return false
+							outsourceEndPick(param).then(res => {
+
+							})
+						}
+
+					}
+				})
+			},
+
 			getWarehouseFn() {
 				getWarehouseList().then(res => {
 					this.warehouseList = res