| | |
| | | <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;"> |
| | | <el-input v-model="form.createusername" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="创建日期" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="创建日期" style=" display: flex;align-items: center"> |
| | | <el-date-picker |
| | | v-model="form.createdate" |
| | | style="width: 200px" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | type="daterange" |
| | | :clearable="false" |
| | | class="timeMini" |
| | | range-separator="~" |
| | | start-placeholder="开始日期" |
| | | style="width: 200px;display: flex;line-height: 34px ;height: 34px ;" |
| | | end-placeholder="结束日期" |
| | | size="mini" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="启用状态" style=" display: flex;"> |
| | | <el-select v-model="form.status" style="width: 200px" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in openTypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="母件编码" |
| | | width="160" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="母件规格" |
| | | width="160" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='Y'"> |
| | | <svg-icon icon-class="circleYes" style="margin-right: 2px" /> |
| | | 在职 |
| | | 是 |
| | | </div> |
| | | <div v-if="row.status==='N'"> |
| | | <svg-icon icon-class="circleNo" style="margin-right: 2px" /> |
| | | 离职 |
| | | 否 |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="startdate" |
| | | label="启用日期" |
| | | width="160" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.startdate">{{ row.startdate.substring(0, 11) }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="version" |
| | | label="版本号" |
| | |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | width="160" |
| | | width="110" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | :disabled="operation!=='add'" |
| | | @change="partSelectChange" |
| | | > |
| | | <el-option |
| | |
| | | v-model="dialogForm.parentpartname" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | @change="partSelectChange" |
| | | > |
| | |
| | | <!-- <el-input v-model="dialogForm.chlx" readonly style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="基础数量" prop="quantity"> |
| | | <el-input v-model="dialogForm.quantity" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px" /> |
| | | <el-input |
| | | v-model="dialogForm.quantity" |
| | | :disabled="operation==='preview'" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item prop="status" label="启用状态"> |
| | | <el-select |
| | | v-model="dialogForm.status" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :disabled="operation==='preview'" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | |
| | | v-model="dialogForm.startdate" |
| | | style="width: 200px" |
| | | type="date" |
| | | :disabled="operation!=='add'" |
| | | value-format="yyyy-MM-dd" |
| | | :clearable="false" |
| | | placeholder="选择日期" |
| | |
| | | }) |
| | | }, |
| | | async getBoIventorySelect() { |
| | | const res = await BoIventorySelect(this.form) |
| | | let tempDate = this.form.createdate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | |
| | | const data = { |
| | | parentpartcode: this.form.parentpartcode, |
| | | parentpartname: this.form.parentpartname, |
| | | parentpartspec: this.form.parentpartspec, |
| | | parttype: this.form.parttype, |
| | | status: this.form.status, |
| | | version: this.form.version, |
| | | createusername: this.form.createusername, |
| | | createdate: tempDate, |
| | | |
| | | prop: this.form.prop, // 排序字段 |
| | | order: this.form.order, // 排序字段 |
| | | page: this.form.page, // 第几页 |
| | | rows: this.form.rows // 每页多少条 |
| | | } |
| | | |
| | | const res = await BoIventorySelect(data) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | return { code: res.code } |
| | |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | await this.getPartSelect() |
| | | const res = await BoIventorySelectView({ bomid: row.id }) |
| | | if (res.code === '200') { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | await this.getPartSelect() |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.parentpartcode = row.partcode |
| | | this.dialogForm.parentpartname = row.partname |
| | | this.dialogForm.parentpartspec = row.partspec |
| | | this.dialogForm.uomcode = row.uom_code |
| | | // this.dialogForm.startdate = row.startdate |
| | | this.dialogForm.startdate = '2022-10-12' |
| | | this.dialogForm.status = row.status |
| | | this.dialogForm.quantity = row.quantity |
| | | this.dialogForm.version = row.version |
| | | }) |
| | | const childrenArr = [] // 子集数组partcode |
| | | |
| | | const { data: res } = await BoIventorySelectView({ bomid: row.id }) |
| | | res.forEach((item, index) => { |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | res.data.forEach((item, index) => { |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | |
| | | // item.SEQ = (index + 1) + '0' |
| | | // item.isVisible = 0 |
| | | // item.number = number |
| | | this.dialogTableDataArr.push({ |
| | | SEQ: item.seq, |
| | | isVisible: 0, |
| | | number, |
| | | SMATERIRL_CODE: item.partcode, |
| | | SMATERIRL_NAME: item.partname, |
| | | SMATERIRL_SPEC: item.partspec, |
| | | uomcode: item.uom_name, |
| | | BASE_QUANTITY: item.base_quantity, |
| | | LOSS_QUANTITY: item.loss_quantity, |
| | | TOTAL_QUANTITY: item.total_quantity, |
| | | PN_TYPE: item.pn_type |
| | | // item.SEQ = (index + 1) + '0' |
| | | // item.isVisible = 0 |
| | | // item.number = number |
| | | this.dialogTableDataArr.push({ |
| | | SEQ: item.seq, |
| | | isVisible: 0, |
| | | number, |
| | | SMATERIRL_CODE: item.partcode, |
| | | SMATERIRL_NAME: item.partname, |
| | | SMATERIRL_SPEC: item.partspec, |
| | | uomcode: item.uom_name, |
| | | BASE_QUANTITY: item.base_quantity, |
| | | LOSS_QUANTITY: item.loss_quantity, |
| | | TOTAL_QUANTITY: item.total_quantity, |
| | | PN_TYPE: item.pn_type |
| | | }) |
| | | childrenArr.push(item.partcode) |
| | | }) |
| | | }) |
| | | // this.dialogTableDataArr.forEach((item, index) => { |
| | | // let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | // number = number === 0 ? (10 + Math.random()) : number |
| | | // |
| | | // item.SEQ = (index + 1) + '0' |
| | | // item.isVisible = 0 |
| | | // item.number = number |
| | | // }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.bomid = row.id |
| | | this.dialogForm.parentpartcode = row.partcode |
| | | this.dialogForm.parentpartname = row.partname |
| | | this.dialogForm.parentpartspec = row.partspec |
| | | this.dialogForm.uomcode = row.uom_code |
| | | this.dialogForm.startdate = row.startdate |
| | | this.dialogForm.status = row.status |
| | | this.dialogForm.quantity = row.quantity |
| | | this.dialogForm.version = row.version |
| | | |
| | | this.PartSelectArr = this.PartSelectArr.filter(item => !childrenArr.includes(item.partcode) && item.partcode !== this.dialogForm.parentpartcode) |
| | | }) |
| | | } |
| | | }, |
| | | // 输入框值改变时触发 |
| | | inputChange(val, row) { |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteBoIventory({ orgid: row.code }).then(res => { |
| | | DeleteBoIventory({ bomid: row.id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-range__icon{ |
| | | line-height: 28px !important; |
| | | } |
| | | ::v-deep .el-range-separator{ |
| | | line-height: 28px !important; |
| | | } |
| | | ::v-deep .el-range-input{ |
| | | font-size: 14px; |
| | | } |
| | | ::v-deep .el-range-separator{ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | | <style> |
| | | |