|
@@ -112,13 +112,8 @@
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="合同附件"
|
|
<a-form-item label="合同附件"
|
|
|
name="ContractAttachment">
|
|
name="ContractAttachment">
|
|
|
- <div class="upload">
|
|
|
|
|
- <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
|
|
- :transform-file="transformFile">
|
|
|
|
|
- <a-button class="uploadBtn">上传</a-button>
|
|
|
|
|
- </a-upload>
|
|
|
|
|
- <div class="look">查看附件</div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <UploadImg :visible="visible"
|
|
|
|
|
+ @upload="uploadImgAction" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
@@ -411,14 +406,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import { initData } from '@/common/methods';
|
|
|
|
|
import { addContractReq } from './setup';
|
|
import { addContractReq } from './setup';
|
|
|
import { getUserName, getUsrId } from '@/services/bus/user';
|
|
import { getUserName, getUsrId } from '@/services/bus/user';
|
|
|
import { getGoodsList } from '@/services/bus/goods';
|
|
import { getGoodsList } from '@/services/bus/goods';
|
|
|
import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
|
|
import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
-import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
|
|
|
|
|
import { FormState } from '../interface';
|
|
import { FormState } from '../interface';
|
|
|
import { formatTime } from '@/common/methods/format';
|
|
import { formatTime } from '@/common/methods/format';
|
|
|
import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
|
|
import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
|
|
@@ -427,10 +420,12 @@ import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handl
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
|
|
import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
|
|
|
import { handlerManagerList } from '@/common/setup/user';
|
|
import { handlerManagerList } from '@/common/setup/user';
|
|
|
|
|
+import { getUploadImg } from '@/common/setup/upload';
|
|
|
|
|
+import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'add-spot-contract',
|
|
name: 'add-spot-contract',
|
|
|
- components: {},
|
|
|
|
|
|
|
+ components: { UploadImg },
|
|
|
props: {
|
|
props: {
|
|
|
selectedRow: {
|
|
selectedRow: {
|
|
|
type: Object as PropType<Ermcp3ContractRsp>,
|
|
type: Object as PropType<Ermcp3ContractRsp>,
|
|
@@ -466,10 +461,9 @@ export default defineComponent({
|
|
|
const merchandiserList = ref<ErmcpLoginUser[]>([]);
|
|
const merchandiserList = ref<ErmcpLoginUser[]>([]);
|
|
|
// 现货商品列表
|
|
// 现货商品列表
|
|
|
const goodsList = ref<Goods[]>([]);
|
|
const goodsList = ref<Goods[]>([]);
|
|
|
|
|
+ const { imgs, uploadImgAction } = getUploadImg();
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if (visible.value) {
|
|
if (visible.value) {
|
|
|
- console.log('merchandiserList', merchandiserList);
|
|
|
|
|
-
|
|
|
|
|
queryCustomList();
|
|
queryCustomList();
|
|
|
getDeliveryGoods();
|
|
getDeliveryGoods();
|
|
|
queryTradeManager();
|
|
queryTradeManager();
|
|
@@ -503,6 +497,10 @@ export default defineComponent({
|
|
|
const EndDate = fn(pDate[1]);
|
|
const EndDate = fn(pDate[1]);
|
|
|
Object.assign(param, { StartDate, EndDate });
|
|
Object.assign(param, { StartDate, EndDate });
|
|
|
}
|
|
}
|
|
|
|
|
+ // 合同附件
|
|
|
|
|
+ if (imgs.value.length) {
|
|
|
|
|
+ param.ContractAttachment = imgs.value[0];
|
|
|
|
|
+ }
|
|
|
sendReq(param, loading, OperateType)
|
|
sendReq(param, loading, OperateType)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|
|
@@ -511,6 +509,7 @@ export default defineComponent({
|
|
|
.catch((err) => {});
|
|
.catch((err) => {});
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
function closeAction() {
|
|
function closeAction() {
|
|
|
//清空添加成功后的数据,确保在此新增打开是个空数据
|
|
//清空添加成功后的数据,确保在此新增打开是个空数据
|
|
|
Object.assign(formState, initFormData());
|
|
Object.assign(formState, initFormData());
|
|
@@ -550,6 +549,7 @@ export default defineComponent({
|
|
|
traderList,
|
|
traderList,
|
|
|
businesserList,
|
|
businesserList,
|
|
|
merchandiserList,
|
|
merchandiserList,
|
|
|
|
|
+ uploadImgAction,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|