<template>
|
<div class="add-sales-details">
|
<el-dialog
|
:close-on-click-modal="false"
|
:visible.sync="editRow.visible"
|
width="64rem"
|
:before-close="handleClose"
|
append-to-body
|
custom-class="delivery-dalog"
|
>
|
<div slot="title" class="tac drawerHeader">
|
{{ editCommonConfig.title }}
|
</div>
|
<div class="dialog-body">
|
<el-form :model="ruleForm" :rules="rules" ref="form" label-width="90px" class="demo-ruleForm">
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="发货单号:" prop="number">
|
<el-input v-model="ruleForm.number" size="mini"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="承运商:" prop="carrier">
|
<el-input v-model="ruleForm.carrier" size="mini"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="运单号:" prop="waybillNumber">
|
<el-input v-model="ruleForm.waybillNumber" size="mini"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6"></el-col>
|
</el-row>
|
</el-form>
|
<el-table
|
ref="multipleTable"
|
:data="tableData"
|
tooltip-effect="dark"
|
style="width: 100%"
|
height="500"
|
border
|
@selection-change="getSelectArray"
|
:header-cell-style="{
|
background: '#f1f3f8',
|
color: '#000009',
|
'font-size': '12px',
|
'font-family': 'PingFangSC'
|
}"
|
size="mini"
|
>
|
<!-- <el-table-column type="selection" width="55"> </el-table-column> -->
|
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
<el-table-column prop="name" label="产品名称" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="number" label="产品编号" show-overflow-tooltip> </el-table-column>
|
<el-table-column prop="orderAmount" label="订单数量"> </el-table-column>
|
<el-table-column prop="amount" label="已发货数量"> </el-table-column>
|
<el-table-column prop="specifications" label="产品规格"> </el-table-column>
|
<el-table-column prop="modelNumber" label="产品型号"> </el-table-column>
|
<el-table-column prop="unit" label="单位"> </el-table-column>
|
<el-table-column prop="deliveryAmount" label="发货数量">
|
<template slot-scope="scope">
|
<el-input
|
v-model.number="scope.row.deliveryAmount"
|
placeholder=""
|
:min="0"
|
size="mini"
|
@change="
|
(val) => {
|
inputContent(val, scope)
|
}
|
"
|
></el-input>
|
</template>
|
</el-table-column>
|
<div slot="empty">
|
<el-empty description="暂无数据"></el-empty>
|
</div>
|
</el-table>
|
</div>
|
<div slot="footer" class="dialog-footer">
|
<template v-if="isView">
|
<el-button @click="editRow.visible = false">关闭</el-button>
|
</template>
|
<template v-else>
|
<el-button type="primary" :loading="isAddloading" @click="saveClick('form')">全部发货完成</el-button>
|
<el-button @click="editRow.visible = false">取消</el-button>
|
<el-button type="primary" :loading="isAddloading" @click="saveClick('form')">确认发货</el-button>
|
</template>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
// import { saveMaterialApply } from "@/api/outsourceEnterpriseManage/index"
|
export default {
|
name: "DeliveryDialog",
|
props: {
|
editCommonConfig: {
|
type: Object,
|
default: () => {
|
return {
|
visible: false,
|
title: "发货",
|
infomation: {}
|
}
|
}
|
}
|
},
|
components: {},
|
data() {
|
return {
|
editRow: this.editCommonConfig,
|
isView: this.editCommonConfig.title === "发货信息",
|
editSelCommonConfig: {
|
editVisible: false,
|
isSelectBox: false,
|
title: "",
|
infomation: {}
|
},
|
isAddloading: false,
|
tableData: [
|
{
|
name: "顶顶顶顶",
|
deliveryAmount: 2
|
}
|
],
|
ruleForm: {
|
number: "",
|
carrier: "",
|
waybillNumber: ""
|
},
|
rules: {
|
number: [{ required: true, message: "请输入发货单号", trigger: "blur" }]
|
}
|
}
|
},
|
created() {
|
// this.setTableForm()
|
},
|
watch: {
|
"editCommonConfig.visible"(val) {
|
if (val) {
|
// this.setTableForm()
|
}
|
}
|
},
|
methods: {
|
handleClose() {
|
this.editRow.visible = false
|
},
|
// 多选回调
|
getSelectArray(arr) {
|
console.log(arr)
|
// let isPush = true
|
// if (arr.length > 0) {
|
// for (let i in arr) {
|
// let item = {
|
// outsourcingOrderNumber: this.editRow.infomation.outsourcingOrderNumber,
|
// materialNumber: arr[i].id,
|
// materialName: arr[i].name,
|
// amount: 1,
|
// unit: arr[i].unit ? arr[i].unit : 1,
|
// type: arr[i].type ? arr[i].type : "",
|
// specs: arr[i].specs ? arr[i].specs : ""
|
// }
|
// console.log(arr, "8989")
|
// isPush = this.getIsPush(this.productTableList.tableInfomation, arr[i].id)
|
// if (isPush) {
|
// this.productTableList.tableInfomation.splice(this.productTableList.tableInfomation.length, 0, item)
|
// }
|
// }
|
},
|
// 数量输入回调
|
inputContent(val, scope) {
|
console.log(val, scope)
|
},
|
saveClick(formName) {
|
this.$refs[formName].validate((valid) => {
|
if (valid) {
|
console.log("保存内容处理")
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<style lang="scss" scoped>
|
::v-deep {
|
.delivery-dalog .el-dialog__header {
|
background: #fff;
|
}
|
.delivery-dalog .el-dialog__body {
|
padding: 20px !important;
|
}
|
.el-dialog__footer {
|
width: 100%;
|
height: 65px;
|
// line-height: 55px;
|
background-color: #fff;
|
padding: 0px 20px 0;
|
text-align: right;
|
box-sizing: border-box;
|
border-top: 0px solid #dadee5;
|
position: relative;
|
.footer-left {
|
position: absolute;
|
top: 0px;
|
left: 20px;
|
}
|
}
|
}
|
</style>
|