更新代码
This commit is contained in:
parent
d8036252db
commit
37d1d4f4a4
@ -18,12 +18,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成本" prop="cost">
|
||||
<el-input-number v-model="formData.cost" :precision="2" :step="0.1" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.cost" :precision="2" :step="0.1" ></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="售价" prop="price">
|
||||
<el-input-number v-model="formData.price" :precision="2" :step="0.1" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.price" :precision="2" :step="0.1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -197,14 +197,14 @@ export default {
|
||||
await RepairProjectApi.updateRepairProject(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success', this.formData.name);
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
const res = await RepairProjectApi.createRepairProject(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success',res.data);
|
||||
this.$emit('success', this.formData.name);
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ import OtherForm from "@/views/repair/other/OtherForm.vue";
|
||||
import request from "@/utils/request";
|
||||
import {getOtherByName} from "@/api/repair/other";
|
||||
import {getProjectByName} from "@/api/repair/project";
|
||||
import {getWares, getWaresByName} from "@/api/repair/wares";
|
||||
import {getWaresByName} from "@/api/repair/wares";
|
||||
|
||||
export default {
|
||||
name: "TicketItem",
|
||||
@ -348,20 +348,21 @@ export default {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
...data,
|
||||
count: 1,
|
||||
totalPrice: data.price
|
||||
totalPrice: data.price,
|
||||
type: null
|
||||
})
|
||||
}
|
||||
// this.list.push(row)
|
||||
},
|
||||
async returnPart(name) {
|
||||
|
||||
const res = await getWaresByName(name)
|
||||
const data = res.data
|
||||
if (data) {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
...data,
|
||||
count: 1,
|
||||
totalPrice: data.price
|
||||
totalPrice: data.price,
|
||||
type: null
|
||||
})
|
||||
}
|
||||
// this.list.push(row)
|
||||
@ -373,7 +374,8 @@ export default {
|
||||
this.list.splice(this.list.length - 1, 0, {
|
||||
...data,
|
||||
count: 1,
|
||||
totalPrice: data.price
|
||||
totalPrice: data.price,
|
||||
type: null
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -55,7 +55,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="销售价格" prop="price">
|
||||
<el-input-number v-model="formData.price" :precision="2" :step="0.1" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.price" :precision="2" :step="0.1" ></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -73,12 +73,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最低库存" prop="miniStock">
|
||||
<el-input-number v-model="formData.miniStock" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.miniStock"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最高库存" prop="maxStock">
|
||||
<el-input-number v-model="formData.maxStock" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.maxStock"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="当前库存" prop="stock">
|
||||
<el-input-number v-model="formData.stock" :max="10"></el-input-number>
|
||||
<el-input-number v-model="formData.stock"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -290,14 +290,14 @@ export default {
|
||||
await WaresApi.updateWares(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success', this.formData.name);
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
const res = await WaresApi.createWares(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success',res.data);
|
||||
this.$emit('success',this.formData.name);
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user