|
|
@@ -320,7 +320,7 @@ export default defineComponent({
|
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
|
isSell.value = formState.ContractType === 1 ? false : true;
|
|
|
|
|
|
- const { deliverygoodsid, goodsid, qty, price, wrstandardid, spotcontractid, spotgoodsbrandid, currencyid, attachment, deliverystartdate, deliveryenddate, startdate, enddate, meruserid, tradeuserid, convertfactor } = props.selectedRow;
|
|
|
+ const { deliverygoodsid, goodsid, qty, price, wrstandardid, spotcontractid, spotgoodsbrandid, currencyid, attachment, deliverystartdate, deliveryenddate, startdate, enddate, subjectid, meruserid, tradeuserid, convertfactor } = props.selectedRow;
|
|
|
if (deliverygoodsid) {
|
|
|
deliveryGoodsChange(deliverygoodsid).then(() => {
|
|
|
formState.GoodsID = goodsid;
|
|
|
@@ -335,8 +335,8 @@ export default defineComponent({
|
|
|
formState.Qty = qty.toString();
|
|
|
formState.Price = price.toString();
|
|
|
formState.CurrencyID = currencyid;
|
|
|
- formState.ContractAttachment = attachment;
|
|
|
- formState.MerUserID = meruserid;
|
|
|
+ formState.SubjectID = subjectid || undefined;
|
|
|
+ formState.MerUserID = meruserid || undefined;
|
|
|
formState.TradeUserID = tradeuserid;
|
|
|
formState.SpotContractID = spotcontractid;
|
|
|
if (deliverystartdate && deliverystartdate !== '--') {
|
|
|
@@ -351,7 +351,8 @@ export default defineComponent({
|
|
|
if (enddate && enddate !== '--') {
|
|
|
priceDate.value.push(moment(enddate));
|
|
|
}
|
|
|
- if (attachment) {
|
|
|
+ if (attachment && attachment !== '--') {
|
|
|
+ formState.ContractAttachment = attachment;
|
|
|
uploadImgList.value = handleImg(attachment);
|
|
|
}
|
|
|
function submit() {
|
|
|
@@ -379,10 +380,12 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
// 处理上传图片
|
|
|
- if (imgs.value.length) {
|
|
|
- param.ContractAttachment = imgs.value[0].replace('./', '/');
|
|
|
- } else {
|
|
|
- param.ContractAttachment = JSON.parse(param.ContractAttachment)
|
|
|
+ if (param.ContractAttachment) {
|
|
|
+ if (imgs.value.length) {
|
|
|
+ param.ContractAttachment = imgs.value[0].replace('./', '/');
|
|
|
+ } else {
|
|
|
+ param.ContractAttachment = JSON.parse(param.ContractAttachment)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
sendReq(param, loading, 2)
|