Commit d3bf1864 authored by jingnan's avatar jingnan 👀

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

parents 8b5582ff 8fb82402
...@@ -285,7 +285,6 @@ export default { ...@@ -285,7 +285,6 @@ export default {
}) })
}, },
update(data, deleteRows = []) { update(data, deleteRows = []) {
console.log(11111, data)
// data // data
const tableData = this.value || [] const tableData = this.value || []
tableData.forEach(row => { tableData.forEach(row => {
...@@ -299,7 +298,6 @@ export default { ...@@ -299,7 +298,6 @@ export default {
} }
} }
}) })
console.log(222, data)
this.$emit('input', data) this.$emit('input', data)
} }
} }
......
<template>
<div class="AssignCardProcess">
<dee-as-com
v-show="baseData"
ref="detailCom"
dis-business
:lay-config="cmpOptions"
:basic-data="baseData"
/>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'AssignCardProcess',
componentName: '调配卡流程中表单',
components: {},
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
cmpOptions: {
typeName: 'AssignCardPaint',
layKey: 'paintProcessFrom'
},
baseData: null
}
},
watch: {
basicData: {
immediate: true,
deep: true,
handler: function(val) {
this.getFormData(val.id)
}
}
},
mounted() {
},
// 组件方法
methods: {
getFormData(id) {
const params = {
'searchItems': {
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': id
}
]
},
'openProps': [{
'name': 'assignCardDetails',
'openProps': [{
'name': 'target',
'openProps': [{
'name': 'extSupporting',
'openProps': [{
'name': 'extProcessPlan'
}]
}]
}]
},
{
'name': 'material'
}],
'toValidateKeys': ''
}
post('/AssignCard/search', params).then((res) => {
this.baseData = res.items.content[0]
})
}
}
}
</script>
<style lang='scss'>
</style>
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
<td class="center">数值</td> <td class="center">数值</td>
</tr> </tr>
<tr> <tr>
<td <td class="center" :class="{ technologist: !technologist }" colspan="2">
class="center"
:class="{ technologist: !technologist }"
colspan="2"
>
零件图号 零件图号
</td> </td>
<td class="input"> <td class="input">
...@@ -33,11 +29,7 @@ ...@@ -33,11 +29,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ technologist: !technologist }">
class="center"
colspan="2"
:class="{ technologist: !technologist }"
>
材料名称 材料名称
</td> </td>
<td class="input"> <td class="input">
...@@ -52,11 +44,7 @@ ...@@ -52,11 +44,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ technologist: !technologist }">
class="center"
colspan="2"
:class="{ technologist: !technologist }"
>
材料牌号 材料牌号
</td> </td>
<td class="input"> <td class="input">
...@@ -71,11 +59,7 @@ ...@@ -71,11 +59,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ technologist: !technologist }">
class="center"
colspan="2"
:class="{ technologist: !technologist }"
>
材料规格 材料规格
</td> </td>
<td class="input"> <td class="input">
...@@ -96,13 +80,7 @@ ...@@ -96,13 +80,7 @@
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="quota"> <el-form-item prop="quota">
<el-input <el-input v-model="form.quota" clearable type="Number" min="0" placeholder="请输入" />
v-model="form.quota"
clearable
type="Number"
min="0"
placeholder="请输入"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
...@@ -113,13 +91,7 @@ ...@@ -113,13 +91,7 @@
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="consumeCount"> <el-form-item prop="consumeCount">
<el-input <el-input v-model="form.consumeCount" clearable type="Number" min="0" placeholder="请输入" />
v-model="form.consumeCount"
clearable
type="Number"
min="0"
placeholder="请输入"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
...@@ -130,13 +102,7 @@ ...@@ -130,13 +102,7 @@
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="price"> <el-form-item prop="price">
<el-input <el-input v-model="form.price" clearable type="Number" min="0" placeholder="请输入" />
v-model="form.price"
clearable
type="Number"
min="0"
placeholder="请输入"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
...@@ -147,66 +113,36 @@ ...@@ -147,66 +113,36 @@
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="lossValue"> <el-form-item prop="lossValue">
<el-input <el-input v-model="form.lossValue" :disabled="true" clearable type="Number" min="0" placeholder="请输入" />
v-model="form.lossValue"
clearable
type="Number"
min="0"
placeholder="请输入"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ costEstimator: !costEstimator }">
class="center"
colspan="2"
:class="{ costEstimator: !costEstimator }"
>
辅助材料损失价值 辅助材料损失价值
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="subMaterialLossValue"> <el-form-item prop="subMaterialLossValue">
<el-input <el-input v-model="form.subMaterialLossValue" clearable placeholder="请输入" type="Number" min="0" />
v-model="form.subMaterialLossValue"
clearable
placeholder="请输入"
type="Number"
min="0"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ costEstimator: !costEstimator }">
class="center"
colspan="2"
:class="{ costEstimator: !costEstimator }"
>
合计损失总值 合计损失总值
</td> </td>
<td class="input"> <td class="input">
<el-form-item prop="totalLossValue"> <el-form-item prop="totalLossValue">
<el-input <el-input v-model="form.totalLossValue" clearable type="Number" min="0" placeholder="请输入" />
v-model="form.totalLossValue"
clearable
type="Number"
min="0"
placeholder="请输入"
/>
<!-- :disabled="costEstimator || (disabled && !costEstimator)" --> <!-- :disabled="costEstimator || (disabled && !costEstimator)" -->
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td <td class="center" colspan="2" :class="{ technologist: !technologist }">
class="center"
colspan="2"
:class="{ technologist: !technologist }"
>
拆卸废品时间/件 拆卸废品时间/件
</td> </td>
<td class="input"> <td class="input">
...@@ -228,24 +164,14 @@ ...@@ -228,24 +164,14 @@
<el-form-item prop="clsign"> <el-form-item prop="clsign">
<label for="">材料定额员:</label> <label for="">材料定额员:</label>
<el-input <el-input v-model="form.clsign" clearable :disabled="Activity_1dnbmb6" class="material-quota-officer" />
v-model="form.clsign"
clearable
:disabled="disabled"
class="material-quota-officer"
/>
<!-- <span class="material-quota-officer" contenteditable="true" /> --> <!-- <span class="material-quota-officer" contenteditable="true" /> -->
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-form-item prop="gysign"> <el-form-item prop="gysign">
<label for="">工艺员:</label> <label for="">工艺员:</label>
<el-input <el-input v-model="form.gysign" clearable :disabled="Activity_1dnbmb6" class="technologists" />
v-model="form.gysign"
clearable
:disabled="disabled"
class="technologists"
/>
<!-- <span class="technologist" contenteditable="true" /> --> <!-- <span class="technologist" contenteditable="true" /> -->
</el-form-item> </el-form-item>
</div> </div>
...@@ -255,23 +181,20 @@ ...@@ -255,23 +181,20 @@
</table> </table>
</el-form> </el-form>
<div class="table-btn"> <div class="table-btn">
<el-button <el-button type="primary" size="small" :disabled="disab" @click="save">确定</el-button>
type="primary" <el-button size="small" :disabled="disab" @click="handleClose">取消</el-button>
size="small"
:disabled="disab"
@click="save"
>确定</el-button>
<el-button
size="small"
:disabled="disab"
@click="handleClose"
>取消</el-button>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
props: {
basicData: {
type: Object,
default: () => null
}
},
data() { data() {
return { return {
item: {}, item: {},
...@@ -296,7 +219,9 @@ export default { ...@@ -296,7 +219,9 @@ export default {
// 工艺员 // 工艺员
technologist: true, technologist: true,
// 成本核算员 // 成本核算员
costEstimator: true costEstimator: true,
// 废品通知单编制
Activity_1dnbmb6: true
} }
}, },
computed: { computed: {
...@@ -317,7 +242,6 @@ export default { ...@@ -317,7 +242,6 @@ export default {
handler(val) { handler(val) {
this.$refs.form && this.$refs['form'].resetFields() this.$refs.form && this.$refs['form'].resetFields()
if (val) { if (val) {
this.item = val
Object.keys(this.form).forEach((key) => { Object.keys(this.form).forEach((key) => {
Object.keys(val).forEach((key2) => { Object.keys(val).forEach((key2) => {
if (key === key2) { if (key === key2) {
...@@ -352,62 +276,83 @@ export default { ...@@ -352,62 +276,83 @@ export default {
} }
}, },
created() { created() {
this.open(this.$attrs['basic-data']) this.open(this.basicData)
}, },
mounted() {}, mounted() { },
methods: { methods: {
// 打开弹出框 // 打开弹出框
open(val) { open(val) {
// 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7 this.$set(this.form, 'gysign', localStorage.getItem('user'))
if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) { this.$nextTick(() => {
this.disabled = false if (val && val.taskkey) {
// if (val.taskkey === 'Activity_1lgytbi') { // 废品通知单编制
// } else if (val.taskkey === 'Activity_1dnbmb6') {
if (val.taskkey === 'Activity_1lgytbi') { this.Activity_1dnbmb6 = false
this.technologist = false }
this.$nextTick(() => { // 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7
this.$set(this.form, 'gysign', localStorage.getItem('user')) if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) {
this.$set(this.rules, 'portCarNumber', [ this.disabled = false
{ // if (val.taskkey === 'Activity_1lgytbi') {
required: true, // } else
message: '请输入零件图号', if (val.taskkey === 'Activity_1lgytbi') {
trigger: 'blur' this.technologist = false
} this.$set(this.form, 'gysign', localStorage.getItem('user'))
]) this.$set(this.rules, 'portCarNumber', [
this.$set(this.rules, 'clmc', [ {
{ required: true,
required: true, message: '请输入零件图号',
message: '请输入材料名称', trigger: 'blur'
trigger: 'blur' }
} ])
]) this.$set(this.rules, 'clmc', [
this.$set(this.rules, 'clph', [ {
{ required: true,
required: true, message: '请输入材料名称',
message: '请输入材料牌号', trigger: 'blur'
trigger: 'blur' }
} ])
]) this.$set(this.rules, 'clph', [
this.$set(this.rules, 'spec', [ {
{ required: true,
required: true, message: '请输入材料牌号',
message: '请输入材料规格', trigger: 'blur'
trigger: 'blur' }
} ])
]) this.$set(this.rules, 'spec', [
this.$set(this.rules, 'disassemblyDate', [ {
{ required: true,
required: true, message: '请输入材料规格',
message: '请输入拆卸废品时间', trigger: 'blur'
trigger: 'blur' }
} ])
]) this.$set(this.rules, 'disassemblyDate', [
}) {
required: true,
message: '请输入拆卸废品时间',
trigger: 'blur'
}
])
}
} else {
this.disabled = true
}
this.searchItem()
}
})
},
searchItem() {
const params = {
searchItems: {
items: [{ 'fieldName': 'id', operator: 'EQ', value: this.basicData.id }],
operator: 'AND'
} }
} else {
this.disabled = true
} }
this.item = val this.$api.searchApi('ScrapNoticeDoc', params).then(res => {
this.$nextTick(() => {
res.items.content[0].taskkey = this.basicData.taskkey
this.item = res.items.content[0]
})
})
}, },
save() { save() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
...@@ -442,50 +387,6 @@ export default { ...@@ -442,50 +387,6 @@ export default {
message: `${message}成功`, message: `${message}成功`,
type: 'success' type: 'success'
}) })
// Object.keys(this.form).forEach(key => {
// this.form[key] = ''
// })
// setTimeout(() => {
// this.$emit('reload')
// }, 500)
},
// 初始化责任人
firstRemoteMethod(query, key) {
if (query !== '') {
const params = {
'indices': [
'User',
'DxUser'
],
'searchItems': {
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': query
}
],
'operator': 'AND'
},
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.HttpRequest('/User/find/recursion', params, 'post')
.then((res) => {
if (res.items.content.length !== 0) {
this.$set(this.form, key, res.items.content[0].userName)
}
})
.catch((err) => {
console.log(err)
})
.finally(() => {})
}
} }
} }
} }
...@@ -494,29 +395,36 @@ export default { ...@@ -494,29 +395,36 @@ export default {
.threeTable { .threeTable {
width: 560px; width: 560px;
margin: 0 20px; margin: 0 20px;
thead { thead {
line-height: 50px; line-height: 50px;
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
} }
tbody { tbody {
line-height: 32px; line-height: 32px;
.input { .input {
input { input {
border: none; border: none;
} }
} }
.width40 { .width40 {
width: 56px; width: 56px;
padding: 0 20px; padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.center { .center {
text-align: center; text-align: center;
} }
.text-indent { .text-indent {
text-indent: 20px; text-indent: 20px;
} }
.signature { .signature {
td { td {
padding: 20px; padding: 20px;
...@@ -524,19 +432,23 @@ export default { ...@@ -524,19 +432,23 @@ export default {
text-align: right; text-align: right;
line-height: 40px; line-height: 40px;
} }
input { input {
border: none; border: none;
border-bottom: 1px solid #000; border-bottom: 1px solid #000;
border-radius: 0; border-radius: 0;
} }
.el-input { .el-input {
width: 150px; width: 150px;
height: 32px; height: 32px;
} }
.el-input__inner { .el-input__inner {
width: 150px; width: 150px;
height: 32px; height: 32px;
} }
// .technologist,.material-quota-officer{ // .technologist,.material-quota-officer{
// display: inline-block; // display: inline-block;
// min-width: 150px; // min-width: 150px;
...@@ -548,6 +460,7 @@ export default { ...@@ -548,6 +460,7 @@ export default {
} }
} }
} }
.technologist, .technologist,
.costEstimator { .costEstimator {
&::before { &::before {
......
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
<label>合计:</label><el-input <label>合计:</label><el-input
v-model="form.accounts" v-model="form.accounts"
clearable clearable
:disabled="costKeeper || (disabled && !costKeeper)" :disabled="true"
placeholder="请输入" placeholder="请输入"
/> />
<!-- <label :class="{ costKeeper: !costKeeper }">合计:</label><el-input <!-- <label :class="{ costKeeper: !costKeeper }">合计:</label><el-input
...@@ -429,6 +429,12 @@ ...@@ -429,6 +429,12 @@
</template> </template>
<script> <script>
export default { export default {
props: {
basicData: {
type: Object,
default: () => null
}
},
data() { data() {
return { return {
item: {}, item: {},
...@@ -477,7 +483,9 @@ export default { ...@@ -477,7 +483,9 @@ export default {
// 成本核算员 // 成本核算员
costEstimator: true, costEstimator: true,
// 成本管理员 // 成本管理员
costKeeper: true costKeeper: true,
// 废品通知单编制禁用
Activity_1dnbmb6: false
} }
}, },
watch: { watch: {
...@@ -539,6 +547,7 @@ export default { ...@@ -539,6 +547,7 @@ export default {
that.workHourMLossCost = 0 that.workHourMLossCost = 0
} }
if (that.curTotalLossCost) { if (that.curTotalLossCost) {
console.log(this)
that.accounts = parseFloat(that.curTotalLossCost) that.accounts = parseFloat(that.curTotalLossCost)
} else if (!that.curTotalLossCost) { } else if (!that.curTotalLossCost) {
that.accounts = 0 that.accounts = 0
...@@ -576,36 +585,52 @@ export default { ...@@ -576,36 +585,52 @@ export default {
}, },
deep: true deep: true
} }
// 'form.accounts': {
// handler(v) {
// this.$emit('accounts', v)
// },
// deep: true
// }
}, },
created() { created() {
this.open(this.$attrs['basic-data']) this.open(this.basicData)
}, },
methods: { methods: {
// 打开弹出框 // 打开弹出框
open(val) { open(val) {
this.$nextTick(() => { this.$nextTick(() => {
// 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7 if (val && val.taskkey) {
// if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) { // 废品通知单编制
// this.disabled = false if (val.taskkey === 'Activity_1dnbmb6') {
// if (val.taskkey === 'Activity_1lgytbi') { this.Activity_1dnbmb6 = true
// this.costEstimator = false }
// } else if (val.taskkey === 'Activity_07owud7') { // 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7
// this.costKeeper = false // if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) {
// } // this.disabled = false
// } else { // if (val.taskkey === 'Activity_1lgytbi') {
// this.disabled = true // this.costEstimator = false
// } // } else if (val.taskkey === 'Activity_07owud7') {
this.disabled = false // this.costKeeper = false
this.costEstimator = false // }
this.costKeeper = false // } else {
this.item = val // this.disabled = true
// }
this.disabled = false
this.costEstimator = false
this.costKeeper = false
this.searchItem()
}
})
},
searchItem() {
const params = {
searchItems: {
items: [{ 'fieldName': 'id', operator: 'EQ', value: this.basicData.id }],
operator: 'AND'
}
}
this.$api.searchApi('ScrapNoticeDoc', params).then(res => {
if (res.items.content) {
this.$nextTick(() => {
res.items.content[0].taskkey = this.basicData.taskkey
this.item = res.items.content[0]
})
}
}) })
}, },
save() { save() {
......
<template>
<div v-if="value" class="online-session-com page-wrap">
<dee-up-table
ref="multipleTable"
:columns="tableColums"
:data="value"
tooltip-effect="light"
/>
</div>
</template>
<script>
export default {
name: 'SupportingCardDetails',
componentName: '调配卡中配套明细列表',
props: {
value: {
type: Array,
default: () => null
}
},
data() {
const that = this
return {
tableColums: [
{ title: 'AO号', key: 'target.extSupporting.extProcessPlan.serialNumber', align: 'center', minWidth: 180 },
{ title: '架次', key: 'target.sorties', align: 'center', hideTip: true, minWidth: 110 },
{ title: '申领人', key: 'target.applyerName', align: 'center' },
{ title: '申领时间', key: 'target.applyTime', align: 'center', minWidth: 180, formatter(row, column) {
return that.$moment(row.target.applyTime).format('YYYY-MM-DD HH:mm:ss')
} },
{ title: '数量', key: 'target.reqAmount', align: 'center' },
{ title: '单位', key: 'target.applyerDepartment', align: 'center' }
],
tableData: []
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss">
.online-session-com {
.mb10{
margin-bottom:10px;
}
.dee-table {
height: calc( 100% - 30px);
.dee-table-body{
height: calc( 100% - 30px);
overflow-y: scroll;
}
}
}
</style>
<template>
<div>
<el-input
v-model="cup"
class="input-with-select el-input--small"
placeholder=""
clearable
style="width: 40%"
@change="change"
/>
<span style="color: #606266"></span>
<el-input
v-model="second"
class="input-with-select el-input--small"
placeholder=""
clearable
style="width: 40%"
@change="change"
/>
<span style="color: #606266"></span>
</div>
</template>
<script>
export default {
name: 'ViscosityBox',
componentName: '黏度框',
props: {
form: {
type: Object,
default: () => null
}
},
data() {
return {
cup: '',
second: ''
}
},
watch: {
'form.id': {
immediate: true,
deep: true,
handler: function(val) {
this.cup = this.form.viscosity && this.form.viscosity.split(' ').length > 1 ? this.form.viscosity.split(' ')[0] : this.form.viscosity
this.second = this.form.viscosity && this.form.viscosity.split(' ').length > 1 ? this.form.viscosity.split(' ')[1] : this.form.viscosity
}
}
},
methods: {
change() {
this.$emit('input', this.cup + ' ' + this.second)
}
}
}
</script>
...@@ -62,8 +62,8 @@ export default { ...@@ -62,8 +62,8 @@ export default {
) )
.then((res) => { .then((res) => {
if (res && res.message.includes('成功')) { if (res && res.message.includes('成功')) {
this.imgLeft = res.items['左'] this.imgLeft = res.items.left
this.imgRight = res.items['右'] this.imgRight = res.items.right
} else { } else {
this.$message({ this.$message({
showClose: true, showClose: true,
......
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