Merge branch 'master' of http://42.192.7.176:3000/suojin/smartpark_durable_front
commit
c9a11dd5ac
10 changed files with 433 additions and 541 deletions
@ -0,0 +1,85 @@ |
||||
<template> |
||||
<el-dialog |
||||
:title="purchaseTitle" |
||||
append-to-body |
||||
:visible.sync="openShow" |
||||
width="30%" |
||||
@close="closeDialog" |
||||
> |
||||
<avue-form ref="form" :option="option"></avue-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
|
||||
}, |
||||
data() { |
||||
return { |
||||
purchaseTitle:'归还', |
||||
openShow: false, |
||||
option: { |
||||
submitBtn: false, |
||||
emptyBtn: false, |
||||
column: [ |
||||
{ |
||||
label: "归还数量", |
||||
prop: "name", |
||||
span: 24, |
||||
type: "number", |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: "请输入", |
||||
trigger: "blur", |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: "归还理由", |
||||
prop: "sex", |
||||
span: 24, |
||||
type:'textarea', |
||||
rows:5, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: "请输入", |
||||
trigger: "blur", |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
}, |
||||
methods: { |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit("closeDialog"); |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate((valid) => { |
||||
if (valid) { |
||||
this.$emit("submit", this.formData); |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,86 @@ |
||||
<template> |
||||
<el-dialog |
||||
:title="purchaseTitle" |
||||
append-to-body |
||||
:visible.sync="openShow" |
||||
width="30%" |
||||
@close="closeDialog" |
||||
> |
||||
<avue-form ref="form" :option="option"></avue-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
|
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
|
||||
}, |
||||
data() { |
||||
return { |
||||
purchaseTitle:'报废', |
||||
openShow: false, |
||||
option: { |
||||
submitBtn: false, |
||||
emptyBtn: false, |
||||
column: [ |
||||
{ |
||||
label: "报废数量", |
||||
prop: "name", |
||||
span: 24, |
||||
type: "number", |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: "请输入", |
||||
trigger: "blur", |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: "报废理由", |
||||
prop: "sex", |
||||
span: 24, |
||||
type:'textarea', |
||||
rows:5, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: "请输入", |
||||
trigger: "blur", |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
}, |
||||
methods: { |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit("closeDialog"); |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate((valid) => { |
||||
if (valid) { |
||||
this.$emit("submit", this.formData); |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,73 @@ |
||||
<template> |
||||
<el-dialog |
||||
:title="purchaseTitle" |
||||
append-to-body |
||||
:visible.sync="openShow" |
||||
width="50%" |
||||
@close="closeDialog" |
||||
> |
||||
<el-tabs v-model="transactionType" @tab-click="handleTabClick"> |
||||
<el-tab-pane label="出库" name="1"></el-tab-pane> |
||||
<el-tab-pane label="入库" name="2"></el-tab-pane> |
||||
<el-tab-pane label="报废" name="3"></el-tab-pane> |
||||
</el-tabs> |
||||
<el-table :data="tableData" style="width: 100%"> |
||||
<el-table-column type="index" width="50"> </el-table-column> |
||||
<el-table-column prop="quantity" label="数量"> </el-table-column> |
||||
<el-table-column prop="operatorName" label="操作人"> </el-table-column> |
||||
<el-table-column prop="operationTime" label="时间"> </el-table-column> |
||||
<el-table-column prop="departmentName" label="部门"> </el-table-column> |
||||
</el-table> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
import { recordList } from "@/api/secondOrder/list"; |
||||
|
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
|
||||
rowData:{ |
||||
type: Object, |
||||
default: () => ({}) |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
transactionType: "1", |
||||
tableData: [], |
||||
purchaseTitle:'记录', |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
console.log('二级出入库记录 rowData',this.rowData); |
||||
}, |
||||
methods: { |
||||
handleTabClick() { |
||||
this.tableData = []; |
||||
// 出库 |
||||
if (this.transactionType == "1") { |
||||
// recordList().then((res) => {}); |
||||
} |
||||
// 入库 |
||||
if (this.transactionType == "2") { |
||||
// recordList().then((res) => {}); |
||||
} |
||||
// 报废 |
||||
if (this.transactionType == "3") { |
||||
// recordList().then((res) => {}); |
||||
} |
||||
}, |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit("closeDialog"); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
Loading…
Reference in new issue