Commit bb50dc71 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents e6ccdf4f e7546366
......@@ -46,21 +46,18 @@ export default {
},
created() {
// 初始化数据
console.log('basicData', this.basicData)
},
methods: {
selectionChange(val) {
this.selection = val
},
submitEvent() {
console.log('this.basicData', this.basicData)
const selection = this.selection.filter(r => {
if (!this.basicData.inStorageRequestItems) {
return true
}
return !this.basicData.inStorageRequestItems.find(item => r.id === item.extMaterialId)
})
console.log('selection', selection)
if (selection.length) {
const data = selection.map(r => {
return {
......
/**
* @Description: 流程编辑
* @author xioln
* @date 2023-09-16
* @FilePath: applications/dee-mes/src/privateComponents/components/FlowEdit/index.vue
*/
<template>
<div class="flow-edit">
<edit-purchase v-if="purchaseVis" :basic-data="basicData" />
<dee-as-com
v-else
:key="refreshKey"
ref="itemTable"
style="border:none;"
model-name="InStorageUse"
:lay-config="cmpOptions"
:basic-data="basicData"
/>
</div>
</template>
<script>
import EditPurchase from '@/privateComponents/components/PurchasingWarehousingProcess'
export default {
name: 'FlowEdit', // name写在组件的最前方,自定义组件为必填
components: { EditPurchase },
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
cmpOptions: {
typeName: 'InStorageRecall',
layKey: 'edit'
},
purchaseVis: false
}
},
computed: {},
watch: {
basicData: {
immediate: true,
deep: true,
handler(val) {
if (val && val.subTypeName) {
switch (val.subTypeName) {
case 'InStorageRecall':
this.cmpOptions = {
typeName: 'InStorageRecall', // 返厂入库
layKey: 'edit'
}
break
case 'InStorageExpire':
this.cmpOptions = {
typeName: 'InStorageExpire', // 三期入库
layKey: 'basicInfo_edit_sanqiruku'
}
break
case 'InStoragePurchase':
// 采购入库
this.purchaseVis = true
break
default:
break
}
}
}
}
},
created() {
// 初始化数据
console.log(' this.basicData', this.basicData)
console.log(' this.form', this.form)
},
methods: {
}
}
</script>
<style lang='scss'></style>
/**
* @Description: 供外出库添加明细弹框
* @author xioln
* @date 2023-08-09
* @FilePath: applications/dee-mes/src/privateComponents/components/OutStorageOfferDetail/components/addOutStorageOfferDetailDialog.vue
*/
<template>
<div class="addOutStorageOfferDetail-dialog">
<dee-as-com
ref="OfferTable"
class="list-table"
:lay-config="{ typeName: 'ExtDxProcessMaterial', layKey: 'table' }"
@selectionChange="selectionChange"
/>
<el-form :model="form" :rules="formRules" style="margin-top: 50px;">
<el-form-item label="申领数量">
<el-input-number v-model="reqAmount" :min="0" />
</el-form-item>
</el-form>
<div slot="footer" class="foot-btn-box">
<el-button type="primary" @click="addEvent">添加</el-button>
<el-button type="primary" @click="submitEvent">确认</el-button>
<el-button @click="cancelEvent">取消</el-button>
</div>
</div>
</template>
<script>
export default {
// componentName: '供外出库添加明细弹窗',
// name: 'AddOutStorageOfferDetailDialog',
components: {},
props: {
basicData: {
type: Object,
default: () => { }
}
},
data() {
return {
selection: [],
defaultData: {},
form: {
},
reqAmount: 0,
formRules: {
reqAmount: [{ required: true, message: '申领数量' }]
},
submitData: []
}
},
computed: {
// maxNum: {
// get() {
// // this.selection
// return 0
// }
// }
},
created() {
// 初始化数据
},
methods: {
selectionChange(val) {
this.selection = val
},
addEvent() {
this.submit()
},
submitEvent() {
this.submit()
this.$emit('submitEvent', { formData: this.submitData })
},
submit() {
var arr = []
this.selection.forEach(sel => {
if (!this.submitData) {
arr.push(sel)
}
this.submitData.forEach(item => {
if (sel.id === item.extMaterialId) {
item.reqAmount = this.reqAmount
} else {
arr.push(sel)
}
})
})
console.log('arr', arr)
if (arr.length) {
const data = arr.map(r => {
return {
'subTypeName': 'OutStorageOutItem',
'extMaterial': r,
'extMaterialId': r.id,
'operator': 'ADD',
'reqAmount': this.reqAmount
}
})
this.submitData = [...data, ...this.submitData]
console.log('this.submitData', this.submitData)
this.$refs.OfferTable.$refs.asCom.getData()
this.$utils.showMessageSuccess('添加成功!')
}
},
cancelEvent() {
this.$emit('cancel')
}
}
}
</script>
<style lang='scss'>
.addOutStorageOfferDetail-dialog {
.list-table {
height: 310px !important;
}
.foot-btn-box {
display: flex;
margin-top: 10px;
justify-content: center;
align-content: center;
}
}
</style>
......@@ -473,11 +473,6 @@ export default {
}
},
watch: {
basicData: {
handler(val) {
},
deep: true
}
},
created() {
// 初始化数据
......
......@@ -6,13 +6,9 @@
*/
<template>
<div class="purchasingwarehousing-process">
<dee-table
v-if="basicData.id"
ref="treeTable"
:data="tableData"
:columns="columns"
:options="optionsTree"
/>
<dee-as-com :lay-config="{ typeName: 'InStoragePurchase', layKey: 'flowView' }" :basic-data="{id:basicData.inventoryReqId}" />
<div class="form-row-title">查看明细</div>
<dee-up-table v-if="basicData.id" ref="treeTable" :data="tableData" :columns="columns" :options="optionsTree" />
</div>
</template>
<script>
......@@ -64,20 +60,26 @@ export default {
},
// { title: '是否合格供应商', key: 'extDxSipplier.isValid', headerAlign: 'center' },
{ title: '制造商', key: 'manufacturer', align: 'center', headerAlign: 'center' },
{ title: '到货日期', key: 'arrivalDate', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate && row.arrivalDate.split(' ')[0]
} },
{ title: '生产日期', key: 'producedTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.producedTime && row.producedTime.split(' ')[0]
} },
{
title: '到货日期', key: 'arrivalDate', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate && row.arrivalDate.split(' ')[0]
}
},
{
title: '生产日期', key: 'producedTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.producedTime && row.producedTime.split(' ')[0]
}
},
{
title: '随产品资料', key: 'withProductMaterial', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return Array.isArray(row.withProductMaterial) ? row.withProductMaterial.join(';') : row.withProductMaterial
}
},
{ title: '紧急程度', key: 'urgency', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
return row.urgency ? '紧急' : '正常'
} },
{
title: '紧急程度', key: 'urgency', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
return row.urgency ? '紧急' : '正常'
}
},
{ title: '入库单价', key: 'stockUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '入库金额', key: 'stockPrice', align: 'center', headerAlign: 'center' },
{ title: '含税单价', key: 'taxUnitPrice', align: 'center', headerAlign: 'center' },
......@@ -93,9 +95,11 @@ export default {
{ title: '合同号', key: 'contractNo', align: 'center', headerAlign: 'center' },
{ title: '备注', key: 'remark', align: 'center', headerAlign: 'center' },
{ title: '状态', key: 'state', align: 'center', headerAlign: 'center' },
{ title: '创建时间', key: 'createTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.createTime && row.createTime.split(' ')[0]
} }
{
title: '创建时间', key: 'createTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.createTime && row.createTime.split(' ')[0]
}
}
],
optionsTree: {
rowKey: 'id',
......@@ -106,24 +110,11 @@ export default {
},
computed: {},
watch: {
// 'basicData.id': {
// immediate: true,
// deep: true,
// handler: function(val) {
// this.searchInStorageRequestItem(val)
// }
// }
},
created() {
// 初始化数据
},
mounted() {
// this.timerId = setInterval(() => {
// if (this.basicData.id) {
// clearInterval(this.timerId)
// this.timerId = null
// }
// }, 200)
if (this.basicData.subTypeName === 'InStoragePurchase') {
this.$nextTick(() => {
if (this.basicData.inStorageRequestItems[0]) {
......@@ -224,4 +215,13 @@ export default {
}
</script>
<style lang='scss'>
.purchasingwarehousing-process {
.form-row-title {
padding-left: 10px;
line-height: 32px;
font-size: 14px;
font-weight: 700;
color: #3590BE;
}
}
</style>
/**
* @Description: 验收入库申请流程详情
* @author xioln
* @date 2023-07-14
* @FilePath: applications/dee-mes/src/privateComponents/components/PurchasingWarehousingProcessView/index.vue
*/
<template>
<div class="purchasingwarehousing-process">
<dee-as-com :lay-config="{ typeName: 'InStoragePurchase', layKey: 'flowView_view' }" :basic-data="{id:basicData.inventoryReqId}" />
<div class="form-row-title">查看明细</div>
<dee-up-table v-if="basicData.id" ref="treeTable" :data="tableData" :columns="columns" :options="optionsTree" />
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
// componentName: '验收入库申请流程详情',
name: 'PurchasingWarehousingProcessView', // name写在组件的最前方,自定义组件为必填
components: {}, // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
tableData: [],
columns: [
{ title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ title: '单据编号', key: 'inventoryReq.reqNo', width: '120', align: 'center', headerAlign: 'center' },
{ title: '所属设备', key: 'subEquipment', headerAlign: 'center', align: 'center' },
{
title: '物料类型', key: 'typeName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extMaterial ? row.extMaterial.resType2.typeName : row.materialTypeName
return value
}
},
{
title: '编码', key: 'typeCode', align: 'center', headerAlign: 'center', width: '100', formatter: (row, column, cellValue, index) => {
const value = row.resCode ? row.resCode : row.extMaterial ? row.extMaterial.resCode : ''
return value
}
},
{ title: '机型', key: 'airModel', align: 'center', headerAlign: 'center' },
{ title: '架次', key: 'sorties', align: 'center', headerAlign: 'center' },
{
title: '计量单位', key: 'unitName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.reqUnit ? row.reqUnit : row.extMaterial ? row.extMaterial.extUnit.unitName : ''
return value
}
},
{ title: '入库数量', key: 'reqAmount', align: 'center', headerAlign: 'center' },
{
title: '供应商', key: 'supplierFullName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extDxSipplier ? row.extDxSipplier.supplierFullName : row.supplier
return value
}
},
// { title: '是否合格供应商', key: 'extDxSipplier.isValid', headerAlign: 'center' },
{ title: '制造商', key: 'manufacturer', align: 'center', headerAlign: 'center' },
{
title: '到货日期', key: 'arrivalDate', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate && row.arrivalDate.split(' ')[0]
}
},
{
title: '生产日期', key: 'producedTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.producedTime && row.producedTime.split(' ')[0]
}
},
{
title: '随产品资料', key: 'withProductMaterial', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return Array.isArray(row.withProductMaterial) ? row.withProductMaterial.join(';') : row.withProductMaterial
}
},
{
title: '紧急程度', key: 'urgency', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
return row.urgency ? '紧急' : '正常'
}
},
{ title: '入库单价', key: 'stockUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '入库金额', key: 'stockPrice', align: 'center', headerAlign: 'center' },
{ title: '含税单价', key: 'taxUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '含税金额', key: 'taxPrice', align: 'center', headerAlign: 'center' },
{ title: '税率', key: 'taxRate', align: 'center', headerAlign: 'center' },
{ title: '报检人', key: 'applyUserName', align: 'center', headerAlign: 'center' },
{
title: '接受仓库', key: 'extname', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.storageZone ? row.storageZone.extname : row.storageZoneName
return value
}
},
{ title: '合同号', key: 'contractNo', align: 'center', headerAlign: 'center' },
{ title: '备注', key: 'remark', align: 'center', headerAlign: 'center' },
{ title: '状态', key: 'state', align: 'center', headerAlign: 'center' },
{
title: '创建时间', key: 'createTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.createTime && row.createTime.split(' ')[0]
}
}
],
optionsTree: {
rowKey: 'id',
'tree-props': { children: 'children' }
},
timerId: null
}
},
computed: {},
watch: {
},
created() {
// 初始化数据
},
mounted() {
if (this.basicData.subTypeName === 'InStoragePurchase') {
this.$nextTick(() => {
if (this.basicData.inStorageRequestItems[0]) {
this.searchInStorageRequestItem(this.basicData.inStorageRequestItems[0].inventoryReqId, 'inventoryReq.id')
}
})
} else {
this.searchInStorageRequestItem(this.basicData.id, 'id')
}
},
methods: {
// 编辑采购入库明细查询InStorageRequestItem/search
searchInStorageRequestItem(id, fieldName) {
const param = {
'rootCondition': {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': fieldName,
'operator': 'EQ',
'value': id
},
{
'fieldName': 'parentId',
'operator': 'ISNULL'
}
],
'operator': 'AND'
}
],
'items': [
]
},
'openProps': [{ 'name': 'extMaterial', 'openProps': [{ 'name': 'resType2' }, { 'name': 'extUnit' }] }, { 'name': 'extDxSipplier' }, { 'name': 'storageZone' }, { 'name': 'inventoryReq' }],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
},
'childCondition': {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [
],
'items': [
]
},
'openProps': [
{
'name': 'extMaterial',
'openProps': [
{ 'name': 'resType2' },
{ 'name': 'extUnit' }
]
},
{ 'name': 'extDxSipplier' },
{ 'name': 'storageZone' },
{ 'name': 'inventoryReq' }
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
}
post('InStorageRequestItem/treeSearch', param).then(res => {
const data = res.items
this.treeTableNoArrange(data)
}).catch((err) => {
console.log(err)
})
},
treeTableNoArrange(tableData) {
tableData.forEach((item, i) => {
item.parentIndex = i + 1
if (item.children) {
item.children.forEach((child, j) => {
child.parentIndex = item.parentIndex + '.' + (j + 1)
})
}
})
this.tableData = tableData
}
}
}
</script>
<style lang='scss'>
.purchasingwarehousing-process {
.form-row-title {
padding-left: 10px;
line-height: 32px;
font-size: 14px;
font-weight: 700;
color: #3590BE;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment