|
@@ -32,7 +32,7 @@
|
|
|
|
|
|
|
|
<view class="listBox-sel">
|
|
<view class="listBox-sel">
|
|
|
<checkbox
|
|
<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" />
|
|
:value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -53,10 +53,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="items"
|
|
<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}}
|
|
<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
|
|
|
</view>
|
|
</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 '>
|
|
<view class="items" v-if=' item.rootCategoryLevelId == 4 '>
|
|
|
<text>状态</text>{{ stateList[Number(item.runStatus)] }}
|
|
<text>状态</text>{{ stateList[Number(item.runStatus)] }}
|
|
|
</view>
|
|
</view>
|
|
@@ -105,7 +126,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="bottom-wrapper rx-bc">
|
|
|
|
|
|
|
+ <view class="bottom-wrapper rx-bc" v-if='rootCategoryLevelId != 23'>
|
|
|
<view>
|
|
<view>
|
|
|
<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
|
|
<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
|
|
|
<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
|
|
<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
|
|
@@ -118,6 +139,19 @@
|
|
|
</view>
|
|
</view>
|
|
|
</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="选择分类"
|
|
<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
|
|
|
|
|
@@ -135,15 +169,24 @@
|
|
|
<zxz-uni-data-select :localdata="warehouseList" v-model="formData.warehouseId"
|
|
<zxz-uni-data-select :localdata="warehouseList" v-model="formData.warehouseId"
|
|
|
dataValue='id' format='{name}' dataKey="name" filterable></zxz-uni-data-select>
|
|
dataValue='id' format='{name}' dataKey="name" filterable></zxz-uni-data-select>
|
|
|
</u-form-item>
|
|
</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-item>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</u-form>
|
|
</u-form>
|
|
|
|
|
|
|
@@ -178,7 +221,12 @@
|
|
|
treeByPid,
|
|
treeByPid,
|
|
|
pageeLedgerMain,
|
|
pageeLedgerMain,
|
|
|
assetPage,
|
|
assetPage,
|
|
|
- getWarehouseList
|
|
|
|
|
|
|
+ getWarehouseList,
|
|
|
|
|
+ getInventoryDetails,
|
|
|
|
|
+ getMaterielDetails,
|
|
|
|
|
+ listInProduct,
|
|
|
|
|
+ listOutsourceInWarehouse,
|
|
|
|
|
+ outsourceEndPick
|
|
|
} from '@/api/pda/workOrder.js'
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
|
|
|
|
|
|
|
@@ -213,7 +261,9 @@
|
|
|
storageKey: null,
|
|
storageKey: null,
|
|
|
|
|
|
|
|
formData: {
|
|
formData: {
|
|
|
- produceRoutingId: ''
|
|
|
|
|
|
|
+ produceRoutingId: '',
|
|
|
|
|
+ dimension: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
|
|
|
|
|
+ .clientEnvironmentId == 3 ? 4 : 3
|
|
|
},
|
|
},
|
|
|
warehouseList: [],
|
|
warehouseList: [],
|
|
|
|
|
|
|
@@ -221,10 +271,9 @@
|
|
|
|
|
|
|
|
stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
|
|
stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
|
|
|
classIds: [],
|
|
classIds: [],
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- dimensionList: [
|
|
|
|
|
- {
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ dimensionList: [{
|
|
|
id: 3,
|
|
id: 3,
|
|
|
name: '包装维度'
|
|
name: '包装维度'
|
|
|
},
|
|
},
|
|
@@ -232,7 +281,11 @@
|
|
|
id: 4,
|
|
id: 4,
|
|
|
name: '物料维度'
|
|
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)
|
|
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)) || []
|
|
let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
|
|
if (Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
|
|
|
this.memoList = this.memoList.concat(_arr[0].turnover)
|
|
this.memoList = this.memoList.concat(_arr[0].turnover)
|
|
|
} else if (Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
|
|
} else if (Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
|
|
|
this.memoList = this.memoList.concat(_arr[0].equipmentList)
|
|
this.memoList = this.memoList.concat(_arr[0].equipmentList)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -356,14 +407,14 @@
|
|
|
getTreeList() {
|
|
getTreeList() {
|
|
|
let params = {}
|
|
let params = {}
|
|
|
if (this.isType == 'feed') {
|
|
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') {
|
|
} else if (this.isType == 'pick') {
|
|
|
params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
|
|
params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26]
|
|
|
} else if (this.isType == 'job') {
|
|
} else if (this.isType == 'job') {
|
|
|
params['ids'] = [4, 7]
|
|
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 => {
|
|
treeByPid(params).then(res => {
|
|
|
this.classificationList = res
|
|
this.classificationList = res
|
|
@@ -408,11 +459,37 @@
|
|
|
isEnd = false
|
|
isEnd = false
|
|
|
let URL = null
|
|
let URL = null
|
|
|
if (this.isType == 'pick') { // 领料
|
|
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') { // 投料
|
|
} 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') { // 报工
|
|
} else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
|
|
|
URL = assetPage
|
|
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() {
|
|
getWarehouseFn() {
|
|
|
getWarehouseList().then(res => {
|
|
getWarehouseList().then(res => {
|
|
|
this.warehouseList = res
|
|
this.warehouseList = res
|