|
|
@@ -232,7 +232,11 @@
|
|
|
</div>
|
|
|
|
|
|
<small
|
|
|
- style="display: block; margin-top: 20px"
|
|
|
+ style="
|
|
|
+ display: block;
|
|
|
+ margin-top: 20px;
|
|
|
+ margin-bottom: 80px;
|
|
|
+ "
|
|
|
class="info"
|
|
|
>{{ $t(`注:建议上传图片大小`) }}1024x1024px,{{
|
|
|
$t("大小不超过")
|
|
|
@@ -287,11 +291,11 @@ export default {
|
|
|
currentData: {},
|
|
|
form: {
|
|
|
sc_item_localid: 0,
|
|
|
- code: "ITEM001", //物料编号
|
|
|
- name: "测试物料本站", //物料名称
|
|
|
- erpitemno: "品号", // 品号
|
|
|
- erpitemname: "品名", // 品名
|
|
|
- marketprice: "32", // 牌价
|
|
|
+ code: "", //物料编号
|
|
|
+ name: "", //物料名称
|
|
|
+ erpitemno: "", // 品号
|
|
|
+ erpitemname: "", // 品名
|
|
|
+ marketprice: "", // 牌价
|
|
|
isauxunit: 0, //是否启用辅助单位
|
|
|
unit: "", //主单位
|
|
|
auxunit: "", // 辅助单位
|
|
|
@@ -304,6 +308,7 @@ export default {
|
|
|
remarks: "", // 备注
|
|
|
pic: "", // 图片
|
|
|
shelf: 0, // 是否上架
|
|
|
+ isenable: 1, // 是否启用
|
|
|
unitid: "", //主单位id
|
|
|
},
|
|
|
rules: {
|
|
|
@@ -446,17 +451,23 @@ export default {
|
|
|
id: 2026051510000001,
|
|
|
content: this.form,
|
|
|
});
|
|
|
- this.tool.showMessage(res, () => {
|
|
|
+ if (res.code === 0) {
|
|
|
this.loading = false;
|
|
|
- this.bindData = {
|
|
|
- ownertable: "sc_item_local",
|
|
|
- ownerid: res.data.sc_item_localid,
|
|
|
- usetype: "default",
|
|
|
- };
|
|
|
- this.$refs["upload"].toUpload();
|
|
|
- this.$emit("onSuccess");
|
|
|
- this.dialogFormVisible = false;
|
|
|
- this.$refs["form"].resetFields();
|
|
|
+ this.$message.error(res.msg || "新建失败");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ this.$message.success("新建成功");
|
|
|
+ this.bindData = {
|
|
|
+ ownertable: "sc_item_local",
|
|
|
+ ownerid: res.data.sc_item_localid,
|
|
|
+ usetype: "default",
|
|
|
+ };
|
|
|
+ this.$refs["upload"].toUpload();
|
|
|
+ this.$emit("onSuccess");
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ this.$refs["form"].resetFields();
|
|
|
+ setTimeout(() => {
|
|
|
this.$router.push({
|
|
|
path: "/ourServiceMaterialDetail",
|
|
|
query: {
|
|
|
@@ -465,7 +476,7 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
this.$store.dispatch("changeDetailDrawer", true);
|
|
|
- });
|
|
|
+ }, 500);
|
|
|
});
|
|
|
},
|
|
|
onCancel() {
|