You may not use js mixin for the particular js file you try to override (i.e /vendor/magento/module-sales/view/adminhtml/web/order/create/scripts.js). Also, your require-config.js declaration is wrong but this not matter since mixin will not work for the js file /vendor/magento/module-sales/view/adminhtml/web/order/create/scripts.js
You may try below steps to override this AdminOrder class of the scripts.js file
I assume you are using a custom Module "Company_MyModule"
Step 1)
Create a xml file sales_order_create_index.xml under /app/code/Company/MyModule/view/adminhtml/layout
File : /app/code/Company/MyModule/view/adminhtml/layout/sales_order_create_index.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="js">
<block class="Magento\Backend\Block\Template" template="Company_MyModule::order/create/js.phtml" name="create2"/>
</referenceContainer>
</page>
step 2)
Create a phtml file js.phtml under /app/code/Company/MyModule/view/adminhtml/templates/order/create
File : /app/code/Company/MyModule/view/adminhtml/templates/order/create/js.phtml
<script>
require([
"prototype",
"Company_MyModule/js/order/create/scripts"
], function(){
});
</script>
step 3)
Create js file scripts.js under /app/code/Company/MyModule/view/adminhtml/web/js/order/create to override AdminOrder class.
File: /app/code/Company/MyModule/view/adminhtml/web/js/order/create/scripts.js
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/* global AdminOrder */
define([
'jquery',
'Magento_Sales/order/create/scripts'
], function (jQuery) {
'use strict';
AdminOrder.prototype.setCustomerId = function(id){
//console.log("override setCustomerId called");
return false;
this.customerId = id;
this.loadArea('header', true);
$(this.getAreaId('header')).callback = 'setCustomerAfter';
$('back_order_top_button').hide();
$('reset_order_top_button').show();
}
});
step 4)
Clear your Magento Cache and alson remove adminhtml static files also.
php bin/magento cache:clean
sudo rm -rf pub/static/adminhtml/*