123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <!-- 添加供应商信息 -->
- <div class="addWagonLoad">
- <PageTitle>返回</PageTitle>
- <el-divider content-position="left">原料供应商信息</el-divider>
- <div class="form-box" style="margin-right: 10rem">
- <dil-form :formId="320" v-model="form1" ref="from1"></dil-form>
- </div>
- <div class="button-box">
- <el-button @click="cancel">取消</el-button>
- <el-button type="primary" @click="makeSure">确定</el-button>
- </div>
- </div>
- </template>
- <script>
- import PageTitle from "@/components/Page/Title";
- export default {
- components: { PageTitle },
- data() {
- return {
- form1: {},
- value: undefined,
- };
- },
- mounted() {},
- methods: {
- makeSure() {
- console.log(this.form1)
- let RmsSupplier = {
- supplierName: this.form1.supplierName,
- supplierAddress: this.form1.supplierAddress,
- supplierRegisterDate: sjTime(this.form1.supplierRegisterDate),
- supplierContactsName: this.form1.supplierContactsName,
- supplierContactNumber: this.form1.supplierContactNumber
- };
- if(
- RmsSupplier.supplierName==null ||
- RmsSupplier.supplierAddress==null ||
- RmsSupplier.supplierRegisterDate==null ||
- RmsSupplier.supplierContactsName==null ||
- RmsSupplier.supplierContactNumber==null
- )this.$message.error("存在空值!");
- else
- this.axios
- .post(
- "/api/v1/rms/insertSupplier",
- RmsSupplier
- )
- .then((res) => {
- if (res.data.code == 200) {
- this.$message({
- type: "success",
- message: "新增成功!",
- });
- // this.$refs.table.refreshData();
- this.$router.go(-1);
- } else {
- this.$message.error("新增失败,可能存在重复!");
- }
- this.$refs['table'].resetField();
- });
- },
- // 取消
- cancel() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style lang='scss' >
- .button-box{
- display: flex;
- text-align: center;
- align-items: center;
- justify-content: center;
- margin-top: 0.3125rem;
- margin-bottom: 1.25rem;
- }
- .form-box{
- display: flex;
- justify-content: center;
- .el-form-item{
- display: flex;
- justify-content: center;
- .el-form-item__label{
- display: flex;
- align-items: center;
- }
- .el-form-item__content{
- .el-input{
- .el-input__inner{
- width: 250px;
- }
- }
- }
- }
- }
- </style>
|