md
This commit is contained in:
parent
5fdf6e3ad1
commit
56564547cd
@ -13,8 +13,8 @@
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="materialCode">
|
||||
<el-select clearable v-model="form.materialCode" placeholder="请选择">
|
||||
<el-form-item label="物料品名" prop="materialCode">
|
||||
<el-select clearable v-model="form.materialCode" placeholder="请选择" @change="handleMaterialCodeChange">
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_material_type"
|
||||
:key="dict.value"
|
||||
@ -78,9 +78,8 @@
|
||||
<script>
|
||||
import { listEmisElectronicPagApply, getEmisElectronicPagApply, delEmisElectronicPagApply, addEmisElectronicPagApply, updateEmisElectronicPagApply } from "@/api/emis/emisElectronicPagApply";
|
||||
import { parseTime,genJsSeqNo } from "@/utils/custom";
|
||||
|
||||
export default {
|
||||
name: "emisElectronicPagApplyForm",
|
||||
name: "ApplyForm",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
@ -96,7 +95,7 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
materialCode: [
|
||||
{ required: true, message: "申购类型不能为空", trigger: ["blur",'change'] }
|
||||
{ required: true, message: "物料品名不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
applyCount: [
|
||||
{ required: true, message: "申请数量不能为空", trigger: "blur" }
|
||||
@ -128,9 +127,18 @@ export default {
|
||||
this.form.applySiteName=this.$store.getters.ownerSiteName;
|
||||
this.form.applySeq=genJsSeqNo();
|
||||
},
|
||||
handleMaterialCodeChange(){
|
||||
if(this.form.materialCode=='1001'){
|
||||
this.form.unitMoney="1";
|
||||
}else{
|
||||
this.form.unitMoney="0";
|
||||
}
|
||||
},
|
||||
handleApplyCountInput(value, item, type){
|
||||
value = value.replace(/[^\d]/g, '')
|
||||
this.form.sumMoney=parseFloat(this.form.applyCount)*1.0;
|
||||
// console.log(this.form.applyCount);
|
||||
// value = value.replace(/[^\d]/g, '')
|
||||
|
||||
this.form.sumMoney=parseFloat(this.form.applyCount)*parseFloat(this.form.unitMoney);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<el-row>
|
||||
<el-button icon="el-icon-arrow-left" size="small" @click="backClick">返回</el-button>
|
||||
<el-button size="small" @click="successOrder">操作</el-button>
|
||||
</el-row>
|
||||
<el-descriptions title="基本信息:" class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="id">{{ emisElectronicPagApply.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购序号">{{ emisElectronicPagApply.applySeq }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购时间">{{ emisElectronicPagApply.applyDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购类型:网点">{{ emisElectronicPagApply.provideType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="物料名称:电子面单">{{ emisElectronicPagApply.applyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购人">{{ emisElectronicPagApply.applyMan }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购人编号">{{ emisElectronicPagApply.applyManCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购站点">{{ emisElectronicPagApply.applySite }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申购站点编号">{{ emisElectronicPagApply.applySiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单价">{{ emisElectronicPagApply.unitMoney }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请数量">{{ emisElectronicPagApply.applyCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="总金额">{{ emisElectronicPagApply.sumMoney }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否已发放">{{ emisElectronicPagApply.blSend }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发放时间">{{ emisElectronicPagApply.sendDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发放人">{{ emisElectronicPagApply.sendMan }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发放人编号">{{ emisElectronicPagApply.sendManCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发放站点">{{ emisElectronicPagApply.sendSite }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发放站点代码">{{ emisElectronicPagApply.sendSiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否取消">{{ emisElectronicPagApply.blCancel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消人">{{ emisElectronicPagApply.cancelMan }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消人代码">{{ emisElectronicPagApply.cancelManCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消时间">{{ emisElectronicPagApply.cancelDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消站点">{{ emisElectronicPagApply.cancelSite }}</el-descriptions-item>
|
||||
<el-descriptions-item label="取消站点代码">{{ emisElectronicPagApply.cancelSiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面单用户站点">{{ emisElectronicPagApply.userSite }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面单用户站点代码">{{ emisElectronicPagApply.userSiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="分配开始编号">{{ emisElectronicPagApply.startNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="分配结束编号">{{ emisElectronicPagApply.endNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="已使用当前编号">{{ emisElectronicPagApply.curStartNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="剩余数量">{{ emisElectronicPagApply.hasBillCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否允许自动分配单号">{{ emisElectronicPagApply.blAllowAllocate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建站点代码">{{ emisElectronicPagApply.createSiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="修改站点代码">{{ emisElectronicPagApply.modifySiteCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="删除标志(0代表存在">{{ emisElectronicPagApply.delFlag }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者">{{ emisElectronicPagApply.createBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ emisElectronicPagApply.createTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新者">{{ emisElectronicPagApply.updateBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ emisElectronicPagApply.updateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ emisElectronicPagApply.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEmisElectronicPagApply } from "@/api/emis/emisElectronicPagApply";
|
||||
|
||||
export default {
|
||||
name: "emisElectronicPagApplyView",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 网点电子面单申请表格数据
|
||||
emisElectronicPagApply: {}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询网点电子面单申请列表 */
|
||||
initData() {
|
||||
this.loading = true;
|
||||
getEmisElectronicPagApply(this.id).then(response => {
|
||||
this.emisElectronicPagApply = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.margin-top{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.printMeClass {
|
||||
font-family: SimHei;
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -8,8 +8,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="materialCode">
|
||||
<el-select clearable v-model="form.materialCode" placeholder="请选择">
|
||||
<el-form-item label="物料品名" prop="materialCode">
|
||||
<el-select clearable v-model="form.materialCode" placeholder="请选择" @change="handleMaterialCodeChange">
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_material_type"
|
||||
:key="dict.value"
|
||||
@ -20,14 +20,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="下发对象" prop="materialCode">
|
||||
<el-form-item label="下发对象" prop="provideType">
|
||||
<el-select clearable v-model="form.provideType" placeholder="" disabled>
|
||||
<el-option label="网点" :value="1"></el-option>
|
||||
<el-option label="网点" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请数量" prop="applyCount">
|
||||
<el-form-item label="下发数量" prop="applyCount">
|
||||
<el-input v-model="form.applyCount" @input="handleApplyCountInput" maxlength="6" placeholder="请输入申请数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -36,6 +36,17 @@
|
||||
<EmisSiteSimplePicker v-model="form.applySiteCode" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单价" prop="unitMoney">
|
||||
<el-input v-model="form.unitMoney" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总金额" prop="sumMoney">
|
||||
<el-input v-model="form.sumMoney" placeholder="" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
@ -74,11 +85,15 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
materialCode: [
|
||||
{ required: true, message: "申购类型不能为空", trigger: ["blur",'change'] }
|
||||
{ required: true, message: "物料品名不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
applyCount: [
|
||||
{ required: true, message: "申请数量不能为空", trigger: "blur" }
|
||||
{ required: true, message: "下发数量不能为空", trigger: "blur" }
|
||||
],
|
||||
applySiteCode: [
|
||||
{ required: true, message: "下发站点不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -106,9 +121,19 @@ export default {
|
||||
// this.form.applySiteName=this.$store.getters.ownerSiteName;
|
||||
this.form.applySeq=genJsSeqNo();
|
||||
},
|
||||
handleMaterialCodeChange(){
|
||||
if(this.form.materialCode=='1001'){
|
||||
this.form.unitMoney="1";
|
||||
}else{
|
||||
this.form.unitMoney="0";
|
||||
}
|
||||
},
|
||||
|
||||
handleApplyCountInput(value, item, type){
|
||||
value = value.replace(/[^\d]/g, '')
|
||||
this.form.sumMoney=parseFloat(this.form.applyCount)*1.0;
|
||||
// this.form.sumMoney=parseFloat(this.form.applyCount)*1.0;
|
||||
this.form.sumMoney=parseFloat(this.form.applyCount)*parseFloat(this.form.unitMoney);
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
||||
@ -69,7 +69,6 @@
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleSend"
|
||||
v-hasPermi="['emis:emisElectronicPagApply:send']"
|
||||
>发放</el-button>
|
||||
@ -80,7 +79,6 @@
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleCancel"
|
||||
:disabled="single"
|
||||
v-hasPermi="['emis:emisElectronicPagApply:cancel']"
|
||||
>取消</el-button>
|
||||
</el-col>
|
||||
@ -356,29 +354,32 @@ export default {
|
||||
},
|
||||
|
||||
handleSend(){
|
||||
const id =this.ids[0];
|
||||
if (id != null) {
|
||||
if (this.ids && this.ids.length>0) {
|
||||
this.$confirm("确认发放?", "提示", {
|
||||
cancelButtonText: "返回",
|
||||
confirmButtonText: "确认发放",
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
}).then(async () => {
|
||||
|
||||
for(let i=0;i<this.ids.length;i++)
|
||||
{
|
||||
let id=this.ids[i];
|
||||
let postData={id:id};
|
||||
sendByApply(postData).then(response => {
|
||||
this.$modal.msgSuccess("发放成功");
|
||||
this.getList();
|
||||
});
|
||||
let res=await sendByApply(postData)
|
||||
}
|
||||
|
||||
this.$modal.msgSuccess("发放成功");
|
||||
this.getList();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
handleCancel(){
|
||||
const id =this.ids[0];
|
||||
if (id != null) {
|
||||
handleCancel(){
|
||||
// const id =this.ids[0];
|
||||
if (this.ids && this.ids.length>0) {
|
||||
|
||||
this.$confirm("确认取消?", "提示", {
|
||||
cancelButtonText: "返回",
|
||||
@ -386,59 +387,24 @@ export default {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
let postData={id:id};
|
||||
cancelApply(postData).then(response => {
|
||||
this.$modal.msgSuccess("取消成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}).then(async () => {
|
||||
|
||||
for(let i=0;i<this.ids.length;i++)
|
||||
{
|
||||
let id=this.ids[i];
|
||||
let postData={id:id};
|
||||
let res=await cancelApply(postData)
|
||||
}
|
||||
|
||||
this.$modal.msgSuccess("取消成功");
|
||||
this.getList();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEmisElectronicPagApply(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
|
||||
// 子组件打开模式
|
||||
// this.currentId= row.id || this.ids;
|
||||
// this.openEmisElectronicPagApply = true;
|
||||
// this.titleEmisElectronicPagApply = "修改";
|
||||
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/emis/emisElectronicPagApply/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEmisElectronicPagApply(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEmisElectronicPagApply(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user