| | |
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | :popper-append-to-body="false"
|
| | | clearable
|
| | | :clearable="false" |
| | | >
|
| | | <el-option
|
| | | v-for="item in treeLeftArr"
|
| | | :key="item.code"
|
| | | :label="item.name"
|
| | | :value="item.code"
|
| | | :disabled="item.disabled" |
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | placeholder="请选择"
|
| | | filterable
|
| | | :popper-append-to-body="false"
|
| | | disabled |
| | | @change="unittypcodeChange"
|
| | | >
|
| | | <el-option
|
| | |
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <!-- :disabled="dialogForm.unittypcode==='1'"--> |
| | | <!-- idSubUnitByReportArr--> |
| | | <el-form-item label="报表辅单位">
|
| | | <el-select
|
| | | v-model="dialogForm.idSubUnitByReport"
|
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | filterable
|
| | | :disabled="dialogForm.unittypcode==='1'"
|
| | | |
| | | :popper-append-to-body="false"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in idSubUnitByReportArr"
|
| | | v-for="item in unitcodeSingleArr" |
| | | :key="item.unitcode"
|
| | | :label="item.unitname"
|
| | | :value="item.unitcode"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <!-- :disabled="dialogForm.unittypcode==='1'"--> |
| | | <el-form-item label="库存常用单位">
|
| | | <el-select
|
| | | v-model="dialogForm.idUnitByStock"
|
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | filterable
|
| | | :disabled="dialogForm.unittypcode==='1'"
|
| | | |
| | | :popper-append-to-body="false"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in idUnitBvStockArr"
|
| | | v-for="item in unitcodeSingleArr" |
| | | :key="item.unitcode"
|
| | | :label="item.unitname"
|
| | | :value="item.unitcode"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <!-- :disabled="dialogForm.unittypcode==='1'"--> |
| | | <el-form-item label="采购常用单位">
|
| | | <el-select
|
| | | v-model="dialogForm.idUnitByPurchase"
|
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | filterable
|
| | | :disabled="dialogForm.unittypcode==='1'"
|
| | | |
| | | :popper-append-to-body="false"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in idUnitBvStockArr"
|
| | | v-for="item in unitcodeSingleArr" |
| | | :key="item.unitcode"
|
| | | :label="item.unitname"
|
| | | :value="item.unitcode"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <!-- :disabled="dialogForm.unittypcode==='1'"--> |
| | | <el-form-item label="销售常用单位">
|
| | | <el-select
|
| | | v-model="dialogForm.idUnitBySale"
|
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | filterable
|
| | | :disabled="dialogForm.unittypcode==='1'"
|
| | | |
| | | :popper-append-to-body="false"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in idUnitBvStockArr"
|
| | | v-for="item in unitcodeSingleArr" |
| | | :key="item.unitcode"
|
| | | :label="item.unitname"
|
| | | :value="item.unitcode"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | <!-- :disabled="dialogForm.unittypcode==='1'"--> |
| | | <el-form-item label="生产常用单位">
|
| | | <el-select
|
| | | v-model="dialogForm.idunitbymanufacture"
|
| | | style="width:200px"
|
| | | placeholder="请选择"
|
| | | filterable
|
| | | :disabled="dialogForm.unittypcode==='1'"
|
| | | |
| | | :popper-append-to-body="false"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in idUnitBvStockArr"
|
| | | v-for="item in unitcodeSingleArr" |
| | | :key="item.unitcode"
|
| | | :label="item.unitname"
|
| | | :value="item.unitcode"
|
| | |
| | | operation: '',
|
| | |
|
| | | treeLeft: [
|
| | | {
|
| | | code: '-1',
|
| | | name: '全部'
|
| | | }
|
| | | // { |
| | | // code: '-1', |
| | | // name: '全部' |
| | | // } |
| | | ], // 左侧树
|
| | | treeLeftArr: [],
|
| | | defaultPropsLeft: {
|
| | |
| | | }
|
| | | },
|
| | |
|
| | | activated() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
created() {
|
| | | activated() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | created() { |
| | |
|
| | | },
|
| | | mounted() {
|
| | |
| | | async getTMaterielClassTree() {
|
| | | const res = await TMaterielClassTree()
|
| | | res.data.forEach(i => {
|
| | | i.idparent = i.idparent ? i.idparent : '-1'
|
| | | i.code = i.code === '0' ? '-1' : i.code |
| | | i.idparent = i.idparent === '0' ? '-1' : i.idparent |
| | | })
|
| | | |
| | | this.treeLeftArr = res.data
|
| | | this.treeLeftArr.forEach(e => {
|
| | | e.name = e.code + ' ' + e.name
|
| | | })
|
| | | // this.treeLeftArr.forEach(e => { |
| | | // e.name = e.code + ' ' + e.name |
| | | // }) |
| | | this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), {
|
| | | parentProperty: 'idparent',
|
| | | customID: 'code',
|
| | | childrenProperty: 'children'
|
| | | })
|
| | |
|
| | | this.$nextTick(() => {
|
| | | this.$refs.treeLeftRef.setCurrentKey('-1')
|
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
|
| | |
| | | treeEditClick(node, data, operation) {
|
| | | this.dialogClassForm.data_sources = data.data_sources
|
| | | this.dialogClassForm.inventoryclasscode = data.code
|
| | | this.dialogClassForm.inventoryclassname = data.name.split(' ')[1]
|
| | | this.dialogClassForm.parentcode = data.idparent === '-1' ? '' : data.idparent
|
| | | // this.dialogClassForm.inventoryclassname = data.name.split(' ')[1] |
| | | this.dialogClassForm.inventoryclassname = data.name |
| | | this.dialogClassForm.parentcode = data.idparent === '-1' ? '-1' : data.idparent |
| | | this.dialogClassForm.OperType = 'Update'
|
| | | this.operation = operation
|
| | | this.dialogClassVisible = true
|
| | | |
| | | this.treeLeftArr.forEach(i => { |
| | | i.disabled = i.code === data.code |
| | | }) |
| | | },
|
| | | treeDeleteClick(node, data) {
|
| | | this.$confirm('是否确认删除?', '提示', {
|
| | |
| | | this.dialogForm.idUnitByPurchase = unitname
|
| | | this.dialogForm.idUnitBySale = unitname
|
| | | this.dialogForm.idunitbymanufacture = unitname
|
| | | this.dialogForm.idSubUnitByReport = unitname |
| | | }
|
| | |
|
| | | if (type === '0') {
|