Browse Source

发料

master
ruanqi 2 years ago
parent
commit
8b7e564bce
  1. 140
      src/views/modules/base/partInformation.vue

140
src/views/modules/base/partInformation.vue

@ -176,16 +176,21 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item prop="phaseCode" :rules="rules.phaseCode">
<span style="cursor: pointer" slot="label" @click="getBaseList(1005)"><a herf="#">阶段 / Phase Code</a></span>
<el-input v-model="modalData.phaseCode " @blur="phaseCodeBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.phaseDescription" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(110)"><a herf="#">商品组1 / Comm Group 1</a></span>
<el-input v-model="modalData.productGroupId1" @blur="productGroupId1Blur" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span>
<el-input v-model="modalData.familyId" @blur="familyIdBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>
</el-form-item>
<!-- <el-form-item>-->
<!-- <span style="cursor: pointer" slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span>-->
<!-- <el-input v-model="modalData.familyId" @blur="familyIdBlur" style="width: 128px"></el-input>-->
<!-- <el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
@ -728,42 +733,42 @@
<!-- </el-table>-->
<!-- </el-tab-pane>-->
<!-- 默认库位页签 -->
<el-tab-pane label="默认库位" name="default_locations">
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
<el-button type="primary" @click="saveDefaultLocation()">新增</el-button>
</el-form>
<el-table
:data="defaultLocationList"
:height="secondHeight - 60"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnLocationList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="150"
fixed="right"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="deleteLocation2(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- <el-tab-pane label="默认库位" name="default_locations">-->
<!-- <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">-->
<!-- <el-button type="primary" @click="saveDefaultLocation()">新增</el-button>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :data="defaultLocationList"-->
<!-- :height="secondHeight - 60"-->
<!-- border-->
<!-- style="width: 100%;">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnLocationList" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed==''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="150"-->
<!-- fixed="right"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" @click="deleteLocation2(scope.row)">删除</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
</el-tabs>
@ -1486,6 +1491,8 @@
productGroupName3: '',
productGroupId4: '',
productGroupName4: '',
phaseCode:'',
phaseDescription:'',
erpPartNo: '',
codeNo: '',
codeDesc: '',
@ -1724,6 +1731,22 @@
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1PhaseDescription',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'phaseDescription',
headerAlign: 'center',
align: 'center',
columnLabel: '阶段',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104001,
@ -2767,6 +2790,13 @@
],
// ======== ========
rules: {
phaseCode: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
partNo: [
{
required: true,
@ -3543,6 +3573,8 @@
manufacturerName: '',
agentId: '',
agentName: '',
phaseCode:'',
phaseDescription:'',
createBy: this.$store.state.user.name,
typeDesignation: '',
hazardCode: '',
@ -3646,6 +3678,8 @@
productGroupName3: row.productGroupName3,
productGroupId4: row.productGroupId4,
productGroupName4: row.productGroupName4,
phaseCode: row.phaseCode,
phaseDescription: row.phaseDescription,
erpPartNo: row.erpPartNo,
codeNo: row.codeNo,
codeDesc: row.codeDesc,
@ -4350,6 +4384,10 @@
this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.phaseCode === '' || this.modalData.phaseCode == null) {
this.$message.warning('请选择阶段!')
return
}
if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@ -4563,6 +4601,21 @@
}
},
phaseCodeBlur () {
if (this.modalData.phaseCode != null && this.modalData.phaseCode !== '') {
getChooselistData({"sqlcode": "select Phase_code, Phase_description from staging_code where Phase_code = '" + this.modalData.phaseCode + "'"}).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.phaseDescription = data.baseListData[0].Phase_description
} else {
this.modalData.phaseDescription = ''
}
}
})
}
},
//
groupIdBlur () {
if (this.modalData.groupId != null && this.modalData.groupId !== '') {
@ -4877,6 +4930,8 @@
strVal = this.modalData.partCostGroupId
} else if (val === 132) {
strVal = this.modalData.planningMethod
} else if (val === 1005) {
strVal = this.modalData.phaseCode
}
this.$refs.baseList.init(val, strVal)
})
@ -4892,6 +4947,9 @@
} else if (this.tagNo === 108) {
this.modalData.familyId = val.family_id
this.modalData.familyName = val.family_name
} else if (this.tagNo === 1005) {
this.modalData.phaseCode = val.Phase_code
this.modalData.phaseDescription = val.Phase_description
} else if (this.tagNo === 109) {
this.modalData.groupId = val.group_id
this.modalData.groupName = val.group_name

Loading…
Cancel
Save