耗材单位模块
This commit is contained in:
parent
99da7fcf5a
commit
4caaa3770f
|
|
@ -173,7 +173,14 @@ export function tbProductStockOperateOutAndOn(data) {
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 副单位
|
||||||
|
export function unittbConsInfo(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/tbConsInfo`,
|
||||||
|
method: "put",
|
||||||
|
data:params
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 库存列表
|
* 库存列表
|
||||||
* @returns
|
* @returns
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@
|
||||||
<span>
|
<span>
|
||||||
{{ scope.row.conUnit }}
|
{{ scope.row.conUnit }}
|
||||||
</span>
|
</span>
|
||||||
<i class="el-icon-edit" @click="editorHandle(scope.row)"></i>
|
<i class="el-icon-edit" @click="editorHandles(scope.row)"></i>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -352,7 +352,6 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 修改和增加 -->
|
<!-- 修改和增加 -->
|
||||||
|
|
||||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow" width="80%">
|
<el-dialog :title="dialogtitle" :visible.sync="dialogshow" width="80%">
|
||||||
<template v-if="dialogtitle != '编辑'">
|
<template v-if="dialogtitle != '编辑'">
|
||||||
<div v-for="(item, index) in ruleForms" :key="index">
|
<div v-for="(item, index) in ruleForms" :key="index">
|
||||||
|
|
@ -482,6 +481,39 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 单位修改 -->
|
||||||
|
<el-dialog :title="unitItem ? unitItem.conName : ''" :visible.sync="dialogtitleunit" width="40%">
|
||||||
|
<template>
|
||||||
|
<div class="unitStyle unitWidth">
|
||||||
|
<div>主单位</div>
|
||||||
|
<div>{{ unitItem ? unitItem.conUnit : '' }}</div>
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
<div style="width: 9px;height: 9px;background-color: #D9D9D9;border-radius: 50%;margin:0 6px;"></div> 订货单位
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="unitStyleBottom unitWidth" @click="switchs = 1" v-if="switchs == 2">
|
||||||
|
<span style="margin-right: 10px;">+</span> 添加单位
|
||||||
|
</div>
|
||||||
|
<div class="unitStyle unitWidth " style="margin-top: 20px;" v-else>
|
||||||
|
<div>副单位</div>
|
||||||
|
<div><input style="width: 100px;" type="text" v-model="unitItem.conUnitTwo"> </div>
|
||||||
|
<div style="display: flex;align-items: center;">
|
||||||
|
<div style="width: 9px;height: 9px;background-color: #D9D9D9;border-radius: 50%;margin:0 6px;"></div> 订货单位
|
||||||
|
<input type="text" disabled placeholder="1">
|
||||||
|
<div style="width: 80px;">{{ unitItem.conUnitTwo }}</div>= <input v-model="unitItem.conUnitTwoConvert"
|
||||||
|
type="number">{{
|
||||||
|
unitItem.conUnit }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; justify-content: center;margin-top: 20px;">
|
||||||
|
<el-button @click="dialogtitleunit = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitUnit()">
|
||||||
|
确 定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog title="选择类型" :visible.sync="typedialogshow">
|
<el-dialog title="选择类型" :visible.sync="typedialogshow">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
|
|
@ -592,7 +624,7 @@ import {
|
||||||
tbConsInfoFlowstock
|
tbConsInfoFlowstock
|
||||||
} from "@/api/consumable";
|
} from "@/api/consumable";
|
||||||
import AddConsTakin from "../components/addConsTakin";
|
import AddConsTakin from "../components/addConsTakin";
|
||||||
import { tbConsInfodownload, tbConsInfoinputStock } from '@/api/invoicing'
|
import { tbConsInfodownload, tbConsInfoinputStock, unittbConsInfo } from '@/api/invoicing'
|
||||||
import { downloadFile } from "@/utils";
|
import { downloadFile } from "@/utils";
|
||||||
import UploadExcel from '@/components/UploadExcel'
|
import UploadExcel from '@/components/UploadExcel'
|
||||||
import consRecordDetail from "../components/cons_record_detail";
|
import consRecordDetail from "../components/cons_record_detail";
|
||||||
|
|
@ -676,6 +708,9 @@ export default {
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
ruleFormLoading: false,
|
ruleFormLoading: false,
|
||||||
|
dialogtitleunit: false,
|
||||||
|
unitItem: { switchs: 2 },
|
||||||
|
switchs: 2,
|
||||||
ruleForms: [],
|
ruleForms: [],
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
conCode: "",
|
conCode: "",
|
||||||
|
|
@ -768,6 +803,15 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async submitUnit() {
|
||||||
|
const res = await unittbConsInfo([{
|
||||||
|
conUnitTwoConvert: this.unitItem.conUnitTwoConvert * 1,
|
||||||
|
conUnitTwo: this.unitItem.conUnitTwo,
|
||||||
|
id: this.unitItem.id
|
||||||
|
}])
|
||||||
|
this.unitItem = {}
|
||||||
|
this.dialogtitleunit = false
|
||||||
|
},
|
||||||
//跳转订单列表
|
//跳转订单列表
|
||||||
toGoodslist(orderNo) {
|
toGoodslist(orderNo) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
|
@ -842,13 +886,18 @@ export default {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 单位编辑
|
||||||
|
editorHandles(row) {
|
||||||
|
this.unitItem = row;
|
||||||
|
this.dialogtitleunit = true;
|
||||||
|
},
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
editorHandle(row) {
|
editorHandle(row) {
|
||||||
this.dialogtitle = "编辑";
|
this.dialogtitle = "编辑";
|
||||||
for (let key in this.ruleForm) {
|
for (let key in this.ruleForm) {
|
||||||
this.ruleForm[key] = row[key];
|
this.ruleForm[key] = row[key];
|
||||||
}
|
}
|
||||||
console.log(row, '调试1')
|
|
||||||
this.ruleForm.id = row.id;
|
this.ruleForm.id = row.id;
|
||||||
this.dialogshow = true;
|
this.dialogshow = true;
|
||||||
},
|
},
|
||||||
|
|
@ -1305,4 +1354,70 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unitStyle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
|
||||||
|
>div:first-child {
|
||||||
|
width: 95px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
text-align: center;
|
||||||
|
border-right: 1px solid #DDDFE6;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
>div:nth-child(2) {
|
||||||
|
width: 120px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
text-align: center;
|
||||||
|
border-right: 1px solid #DDDFE6;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #3F9EFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
>div:last-child {
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999999;
|
||||||
|
|
||||||
|
>input {
|
||||||
|
width: 39px;
|
||||||
|
height: 28px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
border: 1px solid #DDDFE6;
|
||||||
|
margin: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.unitStyleBottom {
|
||||||
|
margin-top: 30px;
|
||||||
|
line-height: 42px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #3F9EFF;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.unitWidth {
|
||||||
|
// width: 418px;
|
||||||
|
height: 42px;
|
||||||
|
border-radius: 2px 2px 2px 2px;
|
||||||
|
border: 1px solid #DDDFE6;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,15 @@
|
||||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="单位">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.conUnit" :placeholder="scope.row.conUnit">
|
||||||
|
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"> </el-option>
|
||||||
|
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo" v-if="scope.row.conUnitTwo"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
<div class="tips"> </div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,15 @@
|
||||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="单位">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.conUnit" :placeholder="scope.row.conUnit">
|
||||||
|
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"> </el-option>
|
||||||
|
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo" v-if="scope.row.conUnitTwo"> </el-option>
|
||||||
|
</el-select>
|
||||||
|
<div class="tips"> </div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue